✓ Accepted answer
You can add and subtract vector3 values, so we can take advantage of that to make that work.
object.Position -= Vector3.new(0, 2.1, 0)
object.Position += Vector3.new(0, 2.1, 0)
If you want it to go up you need to add, and if you want it to go down, you subtract it. If it doesn't perfectly match, just try increasing the 2.1 value or decreasing, until it perfectly matches. So here is your script implementing that:
while true do
script.Parent.Position -= Vector3.new(0, 2.1, 0)
wait(0.001)
end
Edit: it was going down forever because I was subtracting it from the same part, it needs to be subtracted from script.Parent.Parent.Give.Position. Here is the fixed (probably) script:
while true do
script.Parent.Position = script.Parent.Parent.Give.Position - Vector3.new(0, 2.1, 0)
wait(0.001)
end
In this one we don't need to do -= as it's not subracting from itself
15 comments
Thanks, you've shown me so much on how to code through these past few questions, thanks (:
No problem!
Ahh wait, It's not working.
What is exactly the problem?
It keeps on flying into the air, never stopping
It probably is because the wait() is too short, or "script.Parent" is also flying in the air
I checked it but it's still going down forever
Maybe we should use an event when them give position changes the pad moves there
Let me test a script using that rq
rq?#
rq means right quick, and I edited the script
ok
It worked, thanks so much. I've added another question about 4 hours ago about a food that a player eats and it gives them a speed boost. If u know how to deal with tools that would be great.
Yeah, I'll look into that
Thanks!