Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

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

1 comment

0

Well first off you are making the part go up not the player

1 answer

Should be like this because then it make the hit object go upwards hope this helps

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

This discussion is preserved as it was. New answers, comments, and votes are closed.