Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Click Detector Doesn't work?

I want a sound to play when a player clicks a button. Here's the script inside the button,

script.Parent.ClickDetector.MouseClick:connect(function(plr)
	plr.PlayerSoundFolder.WrongSideOfHeavenSong:Play()
end)

Filtering enabled is on. It might be worth noting that this button is named "Head" and is put in a model with a humanoid. It works in single player/test but doesn't actually work on a server. Is there an easy fix?

3 comments

2

ClickDetectors do not work as expected with FilteringEnabled. You will have to utilize Remotes.

0

@XAXA Ugh. So that's a no. There's no easy way to fix this. Lol. Alright. I might just have to change the click detector and make it so you have to walk into the part. I have too many buttons so Romote events would take too long.

0

How about you make one RemoteEvent with the button/song as a parameter?

1 answer

✓ Accepted answer

ClickDetectors are not currently supported while using FilteringEnabled, and will most likely not work, and may even cause minor problems within the game. There are two ways you could go about fixing this; you can either disable FilteringEnabled so that the ClickDetector works, or use RemoteEvents instead.

This discussion is preserved as it was. New answers, comments, and votes are closed.