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

1while true do
2wait (30)
3game.Workspace.Tree:clone
4wait (30)
5end

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.

1while true do
2    wait(30)
3    game.Workspace.Tree:Clone()
4    wait(30)
5end

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

1while true do
2    wait(30)
3    local tree = game.Workspace.Tree:Clone()
4    tree.Parent = game.Workspace
5    wait(30)
6end

And your done!

Ad

Answer this question