Hello! I am still trying to learn LUA, and I've created a block with a script inside of it. The script is supposed to wait a peroid of time, then spawn a noob, then wait, and repeat. I'm pretty sure there is a big error in my code, but i'm still learning, anyway here is the script:
game.workspace.lighting.Noob:clone wait(0.5) repeat
Please help!
You were very close! :D Remember to put capital letters on "Workspace" and "Lighting". Making a loop may be easier.
while true do game.Workspace.Lighting.Noob:Clone() wait(0.5) end
I'm not a professional scripter, but I think this may fix your problem. ;)
I don't know if you want to move to clone to Workspace, but if you want to do so then do this:
while true do noob = game.Workspace.Lighting.Noob:Clone() noob.Parent = game.Workspace noob.Position = Vector3.new(X, Y, Z) wait(0.5) end
^_^
Hey there, you might want to set the parent of the clone so that way it doesn't just exist inside of nil and you can actually see it.
while true do game.Workspace.Lighting.Noob:Clone().Parent = workspace wait(0.5) end
also, here is a little bit of a better way to do it:
while wait(.5) do workspace.Lighting.Noob:Clone().Parent = workspace end
and if you have the noob inside of the Lighting, (just a reminder that Lighting exists under game and not workspace) you would do this:
while wait(.5) do game.Lighting.Noob:Clone().Parent = workspace end
Happy scripting!