Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

5 comments

0

put this script in server script service as a server script

0

I put the script in server script service but its not showing me the rank

0

Okey i fixed it

0

Use :Connect(), :connect() is deprecated.

0

, plr is deprecated try rank.Parent = plr

This discussion is preserved as it was. New answers, comments, and votes are closed.