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

My Click Detector isn't working for no apparent reason?

The script:

local clickDetector = script.Parent.ClickDetector
local event = game.ReplicatedStorage.WantToJoin

clickDetector.MouseClick:Connect(function ()
	print("Click Detector Fired")
	event:FireServer(game.Players.LocalPlayer)
end)

The hierarchy for the parts:

  • JoinButton (part)

    • ClickDetector

    • LocalScript

    • SurfaceGui

It's not printing "Click Detector Fired" and nothing has gotten to the server yet nor has any error messages shown, so I don't know what the issue is. The Click Detector is exactly like when you create it, just with a shorter range (10 studs) but I am in that range.

1 answer

✓ Accepted answer

Is the localscript located in the workspace ? if it is then the localscript wont run

see this article

2 comments

0

Yep, it was. This must've changed since I last developed on Roblox.

0

no this has been a thing since ages

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