Not sure what the problem is with this script for my kill feed. I had followed a tutorial on YouTube because I have never really made an advanced game, this one would be my first actual game that I want to become big. Anyways, I did exactly what the YouTuber did, and it worked perfectly well for them. However, I tested the script, and it didn't work. The script is below.
--Local Script (Yes, I have a remote event in Replicated Storage):
local event = game.ReplicatedStorage.KilledEvent
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid").Died:Connect(function(killed)
local killer = char.Humanoid:FindFirstChild("creator")
if killer.Value then
local killerName = killer.Value.Name
event:FireAllClients(plr, killerName)
end
end)
end)
end)
--Kill feed
local event = game.ReplicatedStorage.KilledEvent
event.OnClientEvent:Connect(function(plr, killerName)
if killerName and plr.Name then
local text = Instance.new("TextLabel")
text.Parent = script.Parent
text.BackgroundColor3 = (255, 255, 255)
text.BackgroundTransparency = 1
text.TextScaled = false
text.TextColor3 = Color3.new(255, 255, 255)
text.Font = Enum.Font.GothamBold
text.Text = plr.Name.." ????? "..killerName
wait(10)
text.Visible = false
end
end)

1 comment
What exactly isn't working?