Hello!
I have a Custom PlayerList, which displays a user's avatar, name, kills for that round, and a killstreak. So far, all the things work. Slight problem - the round kills/killstreak display only updates when the player dies/respawns, instead of as it happens.
There is a RemoteEvent inside ReplicatedStorage labeled as KillUpdate
Here's the LocalScript inside the ScreenGui under StarterGui for the Custom Player List:
game.StarterGui:SetCoreGuiEnabled("PlayerList", false)
local plr = game.Players.LocalPlayer
local kills = plr.leaderstats.Roundkills.Value
local killstreak = plr.leaderstats.Killstreak.Value
local Avatarurl = "http://www.roblox.com/Thumbs/Avatar.ashx?x=500&y=500&Format=Png&username="
while wait(1) do
for _,plr in pairs (game.Players:GetChildren()) do
if script.Parent.Holder:FindFirstChild(plr.Name) then
else
local kills2 = plr.leaderstats.Roundkills.Value
local killstreak2 = plr.leaderstats.Killstreak.Value
I = Instance.new("Frame")
I.Name = plr.Name
I.Parent = script.Parent.Holder
I.Style = "DropShadow"
-- NAME
T = Instance.new("TextLabel")
T.Name = "Username"
T.BackgroundTransparency = 1
T.Text = plr.Name
T.Parent = I
T.Size = UDim2.new(0, 165, 0, 35)
T.Position = UDim2.new(0, 10, 0, 0)
if plr.Name == game.Players.LocalPlayer.Name then
T.TextColor3 = Color3.fromRGB(0, 200, 255)
else
T.TextColor3 = Color3.new(1, 1, 1)
end
T.TextStrokeColor3 = Color3.new(0, 0, 0)
T.TextStrokeTransparency = 0.5
T.TextXAlignment = "Left"
T.Font = "SourceSansBold"
T.TextSize = 20
-- KILLS
K = Instance.new("TextLabel")
K.Name = "RoundKills"
K.BackgroundTransparency = 1
K.Text = kills2
K.Parent = I
K.Size = UDim2.new(0, 20, 0, 35)
K.Position = UDim2.new(0, 155, 0, 0)
K.TextColor3 = Color3.new(1, 1, 1)
K.TextStrokeColor3 = Color3.new(0, 0, 0)
K.TextStrokeTransparency = 0.5
K.TextXAlignment = "Right"
K.Font = "SourceSansBold"
K.TextSize = 20
-- KILL STREAK Stuff
-- AVATAR IMAGE Stuff
-- REMOTE EVENT CALL:
local event = game:GetService("ReplicatedStorage"):WaitForChild("KillUpdate")
K.Changed:connect(function()
local amountOfKills = K.Text
event:FireServer(amountOfKills)
print("Test1")
end)
end
end
end
Script inside ServerScriptStorage:
local event = game:GetService("ReplicatedStorage"):WaitForChild("KillUpdate")
event.OnServerEvent:connect(function(player,amountOfKills)
player.leaderstats.Roundkills.Value = amountOfKills
end)

6 comments
Thank you for your response! I edited my original post with the updated script, no error outputs, but its still not updating the Kill digit on the screengui. Do I have this wrong?
^ Actually, since adding the remote event, its increase the RoundKill.Value of the player who is killed in addition to the killer's RoundKill.Value
What I wrote will constantly update a players kills when they get one
Right. But its not updating the gui in real time, the gui text only updates for the player after they've died/respawned.
I'm sure the problem is in how I implemented your script, would you mind taking a once over look? I updated my main post with your script. I'm sure i did something wrong, as your script looks like it should work without a hitch.
Check the edit