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

Workspace isn't a Vaild member of Workspace?

Asked by 8 years ago

hello helpers i need help with making a respawner for my game but I don't want to put the thing in Server Storage I want a waiting timer to respawn the parent of the script please help me with this here let me try to make it a little simple so i want something that waits then respawn I'm new to Lua scripting its like something like this


while true do wait (30) game.Workspace.Tree:clone wait (30) end

so i want something like that but it does not work on game.workspace.Tree:clone

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

You need to indent your code.

while true do
    wait(30)
    game.Workspace.Tree:Clone()
    wait(30)
end

Then you need to parent it but make it a local variable (Make sure this is a local script)

while true do
    wait(30)
    local tree = game.Workspace.Tree:Clone()
    tree.Parent = game.Workspace
    wait(30)
end

And your done!

Ad

Answer this question