I'm not sure if it's still possible with FE enabled, but this script used to work perfectly fine, but it no longer updates upon re spawning someone. If anyone could help me understand what is wrong here I could really use the help.
Rank Handler: (Assigning the rank)
-- Rank Player Script --
local rs = game:GetService("ReplicatedStorage")
local remotefolder = rs:WaitForChild("RankFolder")
local remote = remotefolder:WaitForChild("RankPlayerOnRespawn")
remote.OnServerEvent:connect(function(Player)
if not Player then
print("an error occured fetching the player")
end
local pRank = Player:GetRoleInGroup(1031446)
wait(1)
local ui = script.Rank:Clone()
ui.Parent = Player.Character
ui.Adornee = Player.Character.Head
while not Player.Character.Humanoid do wait() end
Player.Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local frame = ui.Frame
local name = frame.Name1
local role = frame.TextLabel
name.Text = Player.Name
role.Text = pRank
end)
System to fire the addition of the rank: (This is located in PlayerGUI so it updates when they respawn)
local rs = game:GetService("ReplicatedStorage")
local remotefolder = rs:WaitForChild("RankFolder")
local remote = remotefolder:WaitForChild("RankPlayerOnRespawn")
remote:FireServer()
Within the ReplicatedStorage - > RankFolder My event is still there, it just seems to be an issue with it picking up the new value. Any help would be greatly appreciated.
