Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cant move model from Workspace to ReplicatedStorage, why?

Asked by 5 years ago

So I've coded scripts more complicated than this but for some reason this isn't working. I'm sure there's just one small nick I'm overlooking but I can't seem to figure it out.

Code:

while true do 
    RStorage = game.ReplicatedStorage
    wait(5)
    script.Parent:MoveTo(RStorage)
end

1 answer

Log in to vote
1
Answered by 5 years ago

It's as simple as this:

while true do
    local RStorage = game.ReplicatedStorage
    wait(5)
    script.Parent = RStorage
end

MoveTo is used for models that require to move by a certain amount via Vector3. What you actually needed to do was re-assign the Parent.

0
Thank you Michael_TheCreator 166 — 5y
Ad

Answer this question