Hello. I'm pretty new to scripting, and I would like to know what I did wrong in this script. Here's the script:
local Status = script.Parent local User1 = "PumpyTooClouted" local User2 = "PraddaYou" game.Players.PlayerAdded:Connect(function(Player) if Player.Name == User1 or Player.Name == User2 then wait() Status.Text = "Owner" end end)
Thanks for reading, lol.
This works if you put in in statergui with a local script.
A bit complicated, but it will be better in the long run, as instead of having to change the 'if' statement, you just have to add to the users list.
If it worked, please accept this as the answer, or don't if someone had a better answer.
local Status = script.Parent local Users = {"Quantrium","Tree"} while wait(1) do for i, v in pairs(Users) do if v == game.Players.LocalPlayer.Name then print("this") script.Parent.Text = "tea" end end if script.Parent.Text == "tea" then break end end