Playing a sound from a tool with distance?

I’m wanting to play this sound when the local script fires this event. It plays fine, however, it broadcasts it to the entire server and I’d like for it to only broadcast from the player’s character.

The sound is inside of the tool, which is why I have it selected as a descendant but still broadcasts it serverwide.

local events = game.ReplicatedStorage.Events
local ghost = events.GhostJuice

ghost.OnServerEvent:Connect(function(player)
    print(player.Name.." is drinking Ghost Juice.")
    
	for i,descendant in ipairs(player.Character:GetDescendants()) do
        if descendant.ClassName == "Sound" then
        	descendant:Play()
        end
	end
1 Like

Did you try changing the MaxDistance of the sound? if not people are going to be able to hear the Sound from far away

Did you try changing maxdistance??

Oop didnt see your post mb! Lol

Wow! A simple fix without changing the code. Thank you!

Lol I would of beating him to it XD. Unlucky timing