I want this script to repeat, tried to add a while true do but it didn't work. Anyone know how I can fix it and make it repeat forever?
script.Parent.ClickDetector.MouseClick:Connect(function(player) if player then player:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = true end end)
i think u need to make the frame invisible first sorry if i made something wrong, im not a professional at scripting
local db = true if db == true then script.Parent.ClickDetector.MouseClick:Connect(function(player) if player then player:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = true db = false end end) else script.Parent.ClickDetector.MouseClick:Connect(function(player) if player then player:WaitForChild("PlayerGui").ScreenGui.Frame.Visible = false db = true end end) end