Pretty much the question explains everything
Script:
script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) local Victories = player.leaderstats.Victories local human = hit.Parent:FindFirstChild("Humanoid") if human.Sit then local sound = Instance.new("Sound",game.Workspace.Objects.Sounds) sound.SoundId = "rbxasset://sounds/victory.wav" sound.MaxDistance = 10.000 sound:Play() Victories.Value = Victories.Value + 1 human.Sit = false wait(2) sound:Destroy() end end)
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then --< You need to check it it's an actual player that is touching the part. local player = game.Players:GetPlayerFromCharacter(hit.Parent) local Victories = player.leaderstats.Victories local human = hit.Parent:FindFirstChild("Humanoid") if human.Sit then local sound = Instance.new("Sound",game.Workspace.Objects.Sounds) sound.SoundId = "rbxasset://sounds/victory.wav" sound.MaxDistance = 10.000 sound:Play() Victories.Value = Victories.Value + 1 human.Sit = false wait(2) sound:Destroy() end end end)