How to make sound when checkpoint touched?

My main objective is that i’m trying to make it so whenever a player touches a checkpoint, theres a sound, and only the player that touched the checkpoint heres the sound. I have my sound in StarterGui and I have my Checkpoint script in ServerScriptService, but for some reason the sound part of the script isn’t working. Please help.
Here is my script:

local Rs = game.ReplicatedStorage
local Event = Rs:WaitForChild(“Events”)

game.Players.PlayerAdded:Connect(function(Player)
local leaderstats = Instance.new(“Folder”)
leaderstats.Parent = Player
leaderstats.Name = “leaderstats”

local Stage = Instance.new("NumberValue")
Stage.Parent = leaderstats
Stage.Name = "Stage"
Stage.Value = 0

local CheckpointsFolder = game.Workspace:FindFirstChild("Checkpoints")

for i, Checkpoint in pairs(CheckpointsFolder:GetChildren()) do
	Checkpoint.Touched:Connect(function(Hit)
		if Hit.Parent:FindFirstChild("Humanoid") then
			local PlayerHit = game.Players:GetPlayerFromCharacter(Hit.Parent)

			Checkpoint.Color = Color3.fromRGB(75, 151, 75)
			Checkpoint.Material = Enum.Material.Neon

			if PlayerHit.leaderstats:FindFirstChild("Stage").Value == Checkpoint.Name - 1 then
				PlayerHit.leaderstats:FindFirstChild("Stage").Value = Checkpoint.Name
				workspace.SoundFx.Success:Play()
				Event.CheckPointEvent:FireClient(Player)
			end
		end
	end)

	Player.CharacterAdded:Connect(function(Character)
		repeat
			wait()
		until Character:FindFirstChild("HumanoidRootPart") ~= nil

		local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
		HumanoidRootPart.CFrame = CheckpointsFolder:FindFirstChild(Stage.Value).CFrame + Vector3.new(0, 2, 0)
	end)
end

end)

Screenshot 2023-10-28 at 10.14.20 PM

1 Like

success sound is in startergui
change the location under soundfx in workspace

i did that and it still does not work

Maybe place the success sound under the script