UI Click playing for the whole server?

Hello developers, so recently I came across a little bug. When I hover over my UI to play a sound, it plays globally instead of locally. Is there a fix for this? Should I place the sounds somewhere different?

image

StatsButton.MouseEnter:Connect(function()
	StatsButton:TweenPosition(UDim2.new(0.357, 0,0.480, 0), "In", "Quad", .15, true)
	UiHover:Play()
end)

You can execute the code under a LocalScript so it plays only on the client.

1 Like

It is a local script, that’s the problem and why im confused

Try putting the sounds in replicated storage and cloning them then playing them on the client.

Where is the LocalScript?

StarterGUI in a Screen gui

(Characters)

Try defining the LocalPlayer, maybe it’s gonna work? Try defining everything for the LocalPLayer

Everything is though… I might just have to do a complicated way just to play a stupid sound lol

Wait, try putting the sound in the GUI, maybe because it in Workspace it plays to the whole server?

You need to enable SoundService.RespectFilteringEnabled.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.