local ID = 131149175 game.Players.PlayerAdded:connect(function(Player) wait(1) Player.Character.Humanoid:Died():connect(function() local s = Instance.new("Sound", Player:WaitForChild("PlayerGui")) s.SoundId = "rbxassetid://" ..ID.. "" s.Looped = true s:Play() end) end)
I am trying to make it play a sound when the player dies. 21:44:16.199 - ServerScriptService.Script:5: attempt to call method 'Died' (a userdata value) 21:44:16.201 - Stack Begin 21:44:16.203 - Script 'ServerScriptService.Script', Line 5 21:44:16.205 - Stack End
wait(4) -- Let errythin load while wait() do for i, v in pairs(game.Players:GetChildren()) do repeat wait() until v.Character ~=nil local Char = v.Character local Hum = Char:FindFirstChild("Humanoid") Hum.Died:connect(function() print(v.Name .. " Has Died :(") end) end end