Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i use velocity to push player to the sky?

Asked by 5 years ago
Edited 5 years ago

I create a part, if players touch it, they will be push to the sky but it doesn't work when i set Cancollide = false, how can i fix that ? This is my script

1script.Parent.Touched:Connect(function(hit)
2    local hum = hit.Parent:FindFirstChild("Humanoid")
3    if hum ~= nil then
4        script.Parent.Velocity = Vector3.new(0,100,0)
5    end
6end)

Sorry if it's too confusing, my english is not good

0
Well first off you are making the part go up not the player vortex767 20 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
1Should be like this because then it make the hit object go upwards hope this helps
2 
3script.Parent.Touched:Connect(function(hit)
4    local hum = hit.Parent:FindFirstChild("Humanoid")
5    if hum ~= nil then
6        hit.Velocity = Vector3.new(0,100,0)
7    end
8end)
Ad

Answer this question