Help with position

hi,

I need some help making a script. So I want to make a part go to another parts position when the game Starts.

So the names of the parts are

MovingPart - the part that moves to the other parts position.
EndPart - the end for the MovingPart

I tried using this script

script.Parent.Position = game.Workspace.EndPart.Position 

But for some reason it doesn’t work.

Im not sure whats wrong with it. Can you help me?

From,
File

1 Like

Does it show an error in the console?

script.Parent.CFrame = CFrame.new(game.Workspace.EndPart.CFrame)

idk how your whole script is like but try this.

1 Like

why are you converting a CFrame into a CFrame, that makes zero sense

The script is not wrong, I think the script is running before the part is even loaded in the workspace.
Maybe verify if the parts are there with :FindFirstChild("EndPart") or :WaitForChild("EndPart")
or just add a wait() to wait for a few seconds before the script runs.

Hi everyone! Thanks for all your help.It seems like I used a local instead of a server.