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

Can my script move parts from workspace to replicatedfirst?

Asked by 4 years ago

I made a script that moves a part named button from a group called trapdoor and it moves it to replicatedfirst, but it won't work

game.Workspace.trapdoor.Button = game.ReplicatedFirst
wait(39.8)
game.ReplicatedFirst.Button = game.Workspace.trapdoor

1 answer

Log in to vote
0
Answered by
pingsock 111
4 years ago
Edited 4 years ago

Try this:

local Trapdoor = workspace.trapdoor
local Button = Trapdoor.Button
-- Local statements are used to define what is what, you can change this to a Global statement by removing "local".
Button.Parent = game.ReplicatedFirst
wait(39.8) -- May I ask why this is such an accurate wait time?
Button.Parent = Trapdoor

When using Parent, you're placing the part inside another object/class.

Ad

Answer this question