Can somebody help me this simple script will sometimes work and sometimes not work. Any help?
Asked by
5 years ago Edited 5 years ago
i have this script:
local BillBoardGui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
local roletag = game:GetService("ServerStorage"):WaitForChild("RoleRank")
local GroupID = 5184088
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local ClonedGui = BillBoardGui:Clone()
local ClonedRank = roletag:Clone()
ClonedRank.Value = player:GetRoleInGroup(GroupID)
ClonedGui.Parent = game.Workspace:WaitForChild(player.Name).Head
ClonedRank.Parent = game.Workspace:WaitForChild(player.Name).Head
end)
end)
It is located in ServerScriptService
The script sometimes works and sometimes just doesnt