I tried a while loop to fix this issue but it just exhausted. I don’t know any other ways of running code multiple times without it exhausting like that - what do I do?
All your Attribute commands are correct. But, your logic is a bit off. When you add the Attribute the first time that is now the default. So when you reset the player, that’s how it will start out.
In your 1st script swap the true and false around and it will come up true. As true would now be the default.
Instead of testing for true or false test if it’s there at all.
Try this …
local playButton = joinMenuSgui.playButtonjoinmenu
Player = game.Players.LocalPlayer
-- Player:SetAttribute("playbuttonclicked", false)
playButton.MouseButton1Click:Connect(function()
Player:SetAttribute("playbuttonclicked", true)
end)