Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local part=workspace.Brick1
- local self=script.Parent
- local enabled=false
- self.Touched:Connect(function(hit)
- local player=game.Players:GetPlayerFromCharacter(hit.Parent)
- if player then
- enabled=true
- spawn(function()
- for frames=1,10 do
- if not enabled then return end
- part.Size=part.Size:Lerp(Vector3.new(2,2,2),frames/10)
- wait(0.1)
- end
- end)
- end
- end)
- self.TouchEnded:Connect(function(hit)
- local player=game.Players:GetPlayerFromCharacter(hit.Parent)
- if player then
- enabled=false
- spawn(function()
- for i=1,10 do
- if enabled then return end
- part.Size=part.Size:Lerp(Vector3.new(0.2,0.2,20),i/10)
- wait(0.1)
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement