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

startScript re-entrancy has exceeded 3?

Asked by 3 years ago

hello. i get a error. I know what it means (Too much events at the same time) but it wont go away i tried adding a intvalue so the cloning only works when its 0 and then changing it to 1.

local Pet = script.Parent
if Pet.PetOwner ~= "" then
    if script.Value.Value == 0 then
        Pet:Clone().Parent = game.Players:FindFirstChild(script.Parent.PetOwner.Value).Character.Head
        script.Value.Value = 1
    end
    end
while true do
wait(0.0001)
game.Players:FindFirstChild(script.Parent.PetOwner.Value).Character.Head.Puppy.Position =     game.Players:FindFirstChild(script.Parent.PetOwner.Value).Character.Head.Puppy.Position+ Vector3.new(1, 1, 1)
game.Players:FindFirstChild(script.Parent.PetOwner.Value).Character.Head.Puppy.Orientation =     game.Players:FindFirstChild(script.Parent.PetOwner.Value).Character.Head.Orientation
end

it might be very easy to fix but i dont know how

0
instead of "while true do" change it to "While wait(1) do " mikey2019d 43 — 3y
0
ok NoobPowerPlayzz 15 — 3y
0
Why you need to Clone the script.Parent? It would make another Pet with the script in it, re-run the script and over, over again. Block_manvn 395 — 3y
0
Wait can clone duplicate scripts to? mikey2019d 43 — 3y

Answer this question