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

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
1
Answered by 4 years ago

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

see this article

0
Yep, it was. This must've changed since I last developed on Roblox. AwesomeUniverseYT 56 — 4y
0
no this has been a thing since ages VerdommeMan 1479 — 4y
Ad

Answer this question