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

If player.Name == "Name" then script help?

Asked by 5 years ago

Im trying to make a developer rank on my server but I want it for only myself not everyone and the script should be like this:

if player.Name == "Lipsnucker" then but I dont know how to do it

here's code


local serverStorage = game:GetService("ServerStorage") local billBoardGui = serverStorage:WaitForChild("BillboardGui")

game.Players.PlayerAdded:connect(function(plr)

rank = Instance.new("StringValue",plr)
rank.Name = "Developer"
rank.Value = "Developer"

plr.CharacterAdded:connect(function(char)

    bgc = billBoardGui:Clone()
    bgc.TextLabel.Text = rank.Value

    bgc.Parent = workspace:WaitForChild(char.Name):WaitForChild("Head")

end)

end)


1 answer

Log in to vote
0
Answered by 5 years ago
local serverStorage = game:GetService("ServerStorage")
local billBoardGui = serverStorage:WaitForChild("BillboardGui")

game.Players.PlayerAdded:connect(function(plr)
    if plr.Name == "your name" then
        rank = Instance.new("StringValue",plr)
        rank.Name = "Developer"
        rank.Value = "Developer"

        plr.CharacterAdded:connect(function(char)
            bgc = billBoardGui:Clone()
            bgc.TextLabel.Text = rank.
            bgc.Parent = workspace:WaitForChild(char.Name):WaitForChild("Head")
        end)
    end
end)
0
put this script in server script service as a server script 0_Halloween 166 — 5y
0
I put the script in server script service but its not showing me the rank Lipsnucker 5 — 5y
0
Okey i fixed it Lipsnucker 5 — 5y
0
Use :Connect(), :connect() is deprecated. AswormeDorijan111 531 — 5y
0
, plr is deprecated try rank.Parent = plr MaxDev_BE 55 — 5y
Ad

Answer this question