I'm having trouble with my pad teleport to teleport to this other part constantly at the right height (y value) here's the script:
while true do script.Parent.Position = script.Parent.Parent.Give.Position.Y(2.1) -- I need it to teleport lower wait(0.001) end
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) -- this will subtract object.Position += Vector3.new(0, 2.1, 0) -- this will add
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) -- subtracting makes it lower, so we are using that 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