Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am trying to make a message pop-up for me only and only me, Help?

Asked by 4 years ago

This is the script: local code = script.Parent

game.Players.PlayerAdded:Connect(function(player)

player.CharacterAdded:Connect(function(charater)

    if player.Name == "EpicLLBro" then
        code.Visible = false
    else
        code.Visible = true

    end

end)

end)

0
what is code MemezyDev 172 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Try this :

if game.Players.EpicLLBro then
      script.Parent.Visible = true
else
      script.Parent:Destroy()
end
0
sorry, wrong. if game.Players.LocalPlayer.Name == "EpicLLBro" then cgmaster 15 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Here - if this works, please accept my answer :)

Right now, I have a ScreenGui inside of StarterGui, and inside I have a localscript and a Frame named "code". If you change the name of the frame, change the "local code = script.Parent."name of frame".

Put a localscript inside of the ScreenGui:

local plr = game.Players.LocalPlayer
local code = script.Parent.code

if plr.Name == "YourName" then
    print("Player joined")
    code.Visible = true
else
    print("Error")
    code.Visible = false
end

Hope this helped :)

Answer this question