Hey all,
I was making a UI display some data from the player, but couldn’t get this to refresh when the player resets their character or joins the game
I have tried a couple of things but nothing seemed to work. I’m now stuck at the following:
Player.CharacterAdded:Connect(function()
if Player.Team == Groups.TeamName1 then
if Player:IsInGroup(Groups.ID1) then
local Rank = Player:GetRoleInGroup(Groups.ID1)
RankUI.Text = Groups.Text1 .. " - " .. Rank
else
RankUI.Text = DefaultTeam .. " - " .. "Guest"
end
end
-- This x8 just with other groups and texts, in an 'elseif'.
end)
(‘Groups’ is a table)
The ‘CharacterAdded’ doesn’t seem to trigger anything. Nothing is updating if I join or reset.
The rest of it does work, although it might be possible to simplify/make shorter.
Any help much appreciated!
EDIT: I am using this in a localscript