But the other person can also get the nametag as well.
Here is the script: (server script in StarterCharacterScripts
local character = script.Parent
local riflesTag = script:FindFirstChild("Rifles")
local civillianTag = script:FindFirstChild("Civillian")
local groupID = 13016143
local playerRank = game.Players:GetPlayerFromCharacter(character):GetRoleInGroup(groupID)
local rs = game:GetService("ReplicatedStorage")
local cvCheckFL = rs.TitlesRES:WaitForChild("cvCheckFL")
local cvCheckFS = rs.TitlesRES:WaitForChild("cvCheckFS")
local rfCheckFL = rs.TitlesRES:WaitForChild("cvCheckFL")
local rfCheckFS = rs.TitlesRES:WaitForChild("cvCheckFS")
local re = rs:WaitForChild("titleGiver")
local rfChecker = rs:WaitForChild("rifChecker")
local allowed = rs.TitlesRES:WaitForChild("allowed")
local errormsg = rs.TitlesRES:WaitForChild("errormessage")
--bools
local function cvChecker(player, character, ntClone)
character = character or player.Character or player.CharacterAdded:Wait() -- // Making sure the character really exists.
if player:GetRankInGroup(13016143) >= 0 then
print("civillian")
ntClone = civillianTag:Clone()
wait(.1)
ntClone.Parent = character:FindFirstChild("Head")
ntClone.Adornee = character:FindFirstChild("Head")
ntClone.playerName.Text = character.Name
ntClone.playerRank.Text = "<font color='#FF7276'> [Civillian], </font> "..playerRank
ntClone.Enabled = true
wait(0.3)
end
end
local function rifChecker(player, character, rfClone)
character = character or player.Character or player.CharacterAdded:Wait()
if player:GetRankInGroup(13016143) > 1 then
print("rifles")
rfClone = riflesTag:Clone()
wait(.1)
rfClone.Parent = character:FindFirstChild("Head")
rfClone.Adornee = character:FindFirstChild("Head")
rfClone.playerName.Text = character.Name
rfClone.playerRank.Text = "<font color='#146606'> [RIFLES], </font> " ..playerRank
rfClone.Enabled = true
wait(0.3)
end
end
local function checker(player, character)
character = character or player.Character or player.CharacterAdded:Wait()
if player:GetRankInGroup(13016143) == 1 or player:GetRankInGroup(13016143) == 0 then
print("not allowed")
errormsg:FireClient(player)
end
end
local function rfCheck(player, character)
character = character or player.Character or player.CharacterAdded:Wait()
if player:GetRankInGroup(13016143) > 1 then
rfCheckFS:FireClient(player)
end
end
--13016097 rf instruct.
re.OnServerEvent:Connect(cvChecker)
rfChecker.OnServerEvent:Connect(rifChecker)
rfCheckFL.OnServerEvent:Connect(rfCheck)
allowed.OnServerEvent:Connect(checker)
So how would I go about fixing this? Would I use a server script in ServerScriptService to make the nametag, and then put it on the players head in the script in Starter Character?