i'm making a teleport room for my roblox game, i used a MouseButton1Click event that will add the player to the table, but something went wrong, i have just clicked the Gui once but the event fire a lot of times and insert a lot of thing to the table (my roblox username), how can i fix it ?
this is what i can do, tell me if there is something wrong.
gui.MouseButton1Click:Connect(function(plr) if not plr:FindFirstChild("HasJoined") then local hasjoined = Instance.new("BoolValue", plr) hasjoined.Name = "hasjoined" if not plr:WaitForChild("HasJoined").Value == true then hasjoined.Value = true //put the rest of your script here end end end)