Mouse Leave/Entered

This script is supposed to play the script when you hover your mouse.
It prints and theres no error:

local sound = game.ReplicatedStorage.OtherSounds.MouseEnter_Leave

script.Parent.MouseEnter:Connect(function()
	sound:Play()
	print("MouseEntered")
end)


script.Parent.MouseLeave:Connect(function()
	sound:Play()
	print("MouseLeft")
end)

So does it play the sound at all? Please give more information so I can understand better.

uh whenever the mouse leaves, why do you still play the sound?
try sound:Stop()

1 Like

It plays no sound, just silent. I deleted all the other sounds and made volume 10, but nothing (I deleted it bc the music is loud)

Nope, that did not work. I am not sure what the issue is

Is it in a LocalScript?
Have you tried playing the audio by default since the audio might not be moderated yet.

Its In a server script. Located in a button

Im not familiar with MouseEnter but try adding it inside a LocalScript.

1 Like

Worked! Thank you so much for helping me out :smiley:

Now another issue