I'm trying to update the server when I create these text labels above the player. I'm not getting errors, and it's printing, but the server isn't updating.
Here is my code:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local BGUI = Instance.new("BillboardGui")
local Name = Instance.new("TextLabel")
local Rank = Instance.new("TextLabel")
local Event = game:GetService("ReplicatedStorage").InfoAboveHead
BGUI.Active = true
BGUI.Adornee = game.Workspace:FindFirstChild(Player.Name).Head
BGUI.AlwaysOnTop = false
BGUI.Enabled = true
BGUI.LightInfluence = 0
BGUI.MaxDistance = 30
BGUI.Name = "PlayerInfoAboveHead"
BGUI.Parent = game.Workspace:FindFirstChild(Player.Name).Head
BGUI.ResetOnSpawn = false
BGUI.Size = UDim2.new(5, 0, 0.75, 0)
BGUI.SizeOffset = Vector2.new(0, 3.5)
BGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
print("Overhead GUI created!")
Name.Parent = BGUI
Name.BackgroundTransparency = 1
Name.BorderSizePixel = 0
Name.Name = "NameText"
Name.Size = UDim2.new(1, 0, 0.5, 0)
Name.Font = Enum.Font.SourceSansSemibold
Name.Text = Player.Name
Name.TextScaled = true
Name.TextColor3 = Color3.fromRGB(255, 255, 255)
Name.TextWrapped = true
print("Name text created")
Rank.Parent = BGUI
Rank.BackgroundTransparency = 1
Rank.BorderSizePixel = 0
Rank.Name = "RankText"
Rank.Size = UDim2.new(1, 0, 0.5, 0)
Rank.Font = Enum.Font.SourceSansLight
Rank.Position = UDim2.new(0, 0, 0.5, 0)
--Rank.Text = Player:GetRankInGroup()
Rank.Text = "PlrRank"
Rank.TextScaled = true
Rank.TextColor3 = Color3.fromRGB(255, 255, 255)
Rank.TextWrapped = true
print("Rank text created!")
Event:FireServer(BGUI, Name, Rank)
print("Fired!")

4 comments
Can you also show where you do OnServerEvent?
I haven't done that, I'm new to remote events. Do I need to?
you cant just put :FireServer() if you don't have a server script that will handle it.
so what do i put in the OnServerEvent function? Do I recreate the roles? I'm confused.