Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- WIND TUTORIAL BY BLOXIANCODE youtube.com/c/BloxianCode
- -- Tutorial: https://youtu.be/mfB5LEZpTH8
- local canTouch = true --decides if the player can touch the part and let it change the wind
- script.Parent.Touched:Connect(function(hit) --function fires when something or someone hit the part/brick
- if hit.Parent:FindFirstChild("Humanoid") then --if it was a player who hit, then we continue
- if canTouch == true then --we check if the canTouch value is true. If it is, which means the function can be fired..
- canTouch = false --we set the canTouch value to false
- workspace.GlobalWind = Vector3.new(100,0,0) --we change the wind direction and speed to 100 in the x-direction
- wait(5)
- workspace.GlobalWind = Vector3.new(0,20,0) --we change the wind direction and speed to 20 in the y-direction
- wait(5)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment