How can I move a model via TranslateBy() w/ local script?

I’m creating a model via local script for a client. And I need to move this model to create a small animation. I want to do this code:


while true do
	X:TranslateBy(, 0, -3)) 
	wait (0.01) 

But this doesn’t work unless it’s a server script, and the server script wont run if it’s created on the client. How can I achieve what I need to do?

Use the normal script, and set it’s RunContext to client.

1 Like
local Part = script.Parent

while true do

also have you setted your primary part of the model?

    local pos = script.Parent:GetPivot()
    script.Parent:PivotTo(, pos.Y, pos.Z - 3)

Setting RunContext just changes the script to a local script? Which I’ve already tried.

But it lets it run when its a descendant of workspace, which local scripts do not. Judging by your code, it looks like that’s the case.

Okay ty