Okay so to elaborate, me and my friend a long time ago started making a game, and me and him wanted a team that only he and I could access, so I implemented the following script. However, it would always freeze my game, but no one else's, including "Sinx_Clair" as he could load into the game and play it without any problems occurring. But I also realized if I played on some other account aka my alt, "thesavagery214", it would work perfectly fine, without freezing me. It wasn't until I was making a new team change menu today, that I realized this script is what would make my main account freeze. However, I see nothing that in theory would freeze my main account but not my alt or my friends.
((This is a local script in a GUI Button))
local plr = game.Players.LocalPlayer
while true do
if plr.Name == "thesavagery212" then
script.Parent.Visible = true
else
script.Parent:Destroy()
end
end
while true do
if plr.Name == "Sinx_Clair" then
script.Parent.Visible = true
else
script.Parent:Destroy()
end
end
while true do
if plr.Name == "thesavagery214" then
script.Parent.Visible = true
else
script.Parent:Destroy()
end
end

1 comment
you are doing while true do. and no wait() statement at the end. if you do that, you will make your game lag like crazy