script.Parent.Parent.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) end end) for i = 5, 1, -1 do script.Parent.Text = i print("Done") end
https://gyazo.com/acc8aaca229a2730f0a1a075f3450fc5
Hi this ring is supposed to countdown from 5 whenever touched by the player but it fires 5 times and shows nothing on the billboard GUI text. Can someone help me with this
enclose the for loop inside the touched and add a var that checks it
bool=false script.Parent.Parent.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOFClass("Humanoid") and not bool then bool=true local plr = game.Players:GetPlayerFromCharacter(hit.Parent) for i = 5, 1, -1 do script.Parent.Text = i print("Done") end end end)