I'm trying to use this to make a GUI appear every time a certain player respawns, but it doesn't work for some reason.
local Players = game:GetService("Players")
local function onCharacterAdded(character)
if character.Name == "Mexual" then
game.Players.Mexual.PlayerGui:WaitForChild("OpEn").Frame.Visible = true
else
character.PlayerGui:WaitForChild("OpEn").Frame.Visible = false
end
end

1 comment
Give us some context of what are you trying to do and how would this work.