Hello developers,
I have a problem which is I don’t know why. My script stops executing for some reason and no error in the output printed. The script runs well about 5 minutes before it stops executing. I really looking forward to any solutions.This is my script:
local char = game.ReplicatedStorage.Character:GetChildren()
for i , v in pairs(char)do
v.HumanoidRootPart:WaitForChild("ProximityPrompt").Triggered:Connect(function(player)
game.Workspace:WaitForChild("PizzaDeliver"):Destroy()
game.Workspace.PromptInterract.Pizza.ProximityPrompt.Enabled = true
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 15
v:Destroy()
print("gogogagagogogaga")
end)
end
So everything seems good. I’m not sure if for i,v… loop doesn’t have a limit of time it can run for. Maybe that is the reason why it stops working after few mins.