Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Click Detector Doesn't work?

Asked by 8 years ago

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?

2
ClickDetectors do not work as expected with FilteringEnabled. You will have to utilize Remotes. XAXA 1569 — 8y
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. User#11440 120 — 8y
0
How about you make one RemoteEvent with the button/song as a parameter? Pyrondon 2089 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

Ad

Answer this question