Ad
Log in to vote
0

This Noob auto-spawn decided to just stop working. Why?

Asked by 1 month ago
local m = game.ServerStorage.Clones.Noob:Clone()

while true do
    wait(1)
    local cloned = m:Clone()
    cloned.Parent = script.Parent
    cloned:MoveTo(Vector3.new(math.random(-150,150), 10, math.random(-150,150)))
    cloned:makeJoints()
end

This used to work, but it just randomly just broke, any ideas on why it broke?

Faulty line is local cloned = m.clone().

1 answer

Log in to vote
1
Answered by 1 month ago
Edited 1 month ago

The problem is, you are cloning an object that is already been cloned.

I suggest you do this :

local m = game.ServerStorage.Clones.Noob 
while true do
wait(1)
local cloned = m:Clone()
cloned.Parent = script.Parent
cloned:MoveTo(Vector3.new(math.random(-150,150), 10, math.random(-150,150)))    cloned:makeJoints()
end
Ad

Answer this question