I would like to make a part that only while I am touching it, I float upwards (levitate upward). Maybe when I am touching it, the gravity changes to negative numbers? I am a very amateur scripter, so a step-by-step or explanation could help lol. Thanks, -Michael
COMMUNITY QUESTION
How do I make a part that when I am touching it, I am moved upwards?
1 answer
what I get is that you are trying to make an elevator if that's the case then you would have to anchor the part so it doesn't go crazy. Play around with the 0.35 and see how fast you want it to go up.
script.Parent.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") then
script.Parent.Position = script.Parent.Position + Vector3.new(0, 0.35, 0)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
That's actually pretty cool, and I may use it. I would like my character or "Humanoid" to move upwards however. But I only would like my character to move up while I am touching the brick. (Keep in mind, Collisions are going to be off for the part.)
Also, here is a link to an extrordinary video I made. I almost want my character to float on the part, maybe like water. https://www.youtube.com/watch?v=psEg2NOhHWw