im having problems with my sound not stopping when im trying to stop it
--- This script is inside a server script in a part
local promt = script.Parent.ProximityPrompt
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
promt.Triggered:Connect(function(player)
local LocalPlayer = player
local PlayerGui = Player:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui.BlackFadeStoreYeahYeah
local Frame = ScreenGui.Frame
if LocalPlayer then
if Player then
game.Workspace.Woahh:Stop()
Player.CameraMinZoomDistance = 0.5
LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed = 0
Frame.Visible = true
script.Parent.Sound:Play()
wait(0.25)
Player.CameraMaxZoomDistance = 0.5
LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(game.Workspace.Teleports.DoorInsideTeleport.Position))
wait(1)
game.Workspace.Union.Bruh:Play()
LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed = 10
Frame.Visible = false
end
end
end)
end)
end)