How can i change a positon?

I want to make a script where when a event is fired, a part changes positions from its original one but i dont know how to do it, does anyone know how?

Part Position is set using a datatype (a little special object that holds structured data) called Vector3.

If you want to move a part, you set the position to a Vector3 like such:

Part.Position = Vector3.new(0, 50, 0)

You can also use the operators -= and += to move the position, again with a Vector3:

Part.Position += Vector3.new(0, 1, 0)

To listen to a Touch event, you can use a thing called an event. Use the Connect method to write a handler function, known as an “event handler”

Part.Touched:Connect(function(otherPart)
  -- otherPart here is the part that touched this part
  Part.Position += Vector3.new(0, 10, 0)
end)

if its an remoteevent your mentioning, try

theremoveevent.OnServerEvent:Connect(function()
yourpart.Position = Vector3.new(0, 15, 0)
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.