Hello robloxians!
I’m trying to make a sound that plays when player leaves the game similarly to how it is in pressure where you can hear sebastians say “Bye!” when leaving the game.
My Current local script looks like:
local Players = game:GetService(“Players”)
local Player = Players.LocalPlayer
local SoundIDs = { – sound IDs
114060100371339, – Goodbye!
73950896903521, – Byeee!
132010216556223, – Bye in another language
82159782124722, – Cya
79182262330526, – GGs
120683410406490
}
Players.PlayerRemoving:Connect(function(PlayerR)
if PlayerR == Player then
print(“Goodbye!”)
local Bye = SoundIDs[math.random(1,#SoundIDs)] – Random ID from the list
script.Sound.SoundId = Bye
script.Sound:Play()
end
end)
But it doesn’t work and I’d be glad to get some help on that.
I also could not find any models in the toolbox that would do this so went to the forum!
Further help is appreciated