attempted to make a kill confirmed type of thing. No error and I cant figure out what to do.
script that detects if that player shot dies (local script in a GUI)
[I have another script similar to this, but it's a kill cam. Thinking I can modify what I made to make a sound when that player kills someone]:
local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
hum.Died:Connect(function(killed)
local killer = char.Humanoid:FindFirstChild("creator")
if killer.Value then
game.ReplicatedStorage.SOUND2:FireServer(killer)
end
end)
script that got fired: (server script, in a GUI)
game.ReplicatedStorage.SOUND2.OnServerEvent:Connect(function(killer)
local killer = killer.Humanoid:FindFirstChild("creator")
if killer.Value then
script.Parent.Sound2:Play()
end
end)

2 comments
What is the sound parented to?
the sound is in the GUI. aka outside of the script that got fired