I’m making a jumpscare part but a jumpscare without sound is quite stupid: yet it’s won’t play the sound.
workspace.JumpscareZone.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local jumpscare = workspace.JumpscareZone.Jumpscare:Clone()
jumpscare.Parent = plr.PlayerGui
local audio = Instance.new("Sound")
audio.Name = "Jumpscare"
audio.Parent = jumpscare
audio.SoundId = 5351101493
audio:Play()
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All,false)
wait(1)
jumpscare:Destroy()
audio:Destroy()
local died = game.ReplicatedStorage.Died:Clone()
died.Parent = plr.PlayerGui
wait(5)
plr:Kick("You died to face: when the lights break, quickly hide")
end
end)