Is there a way to make a click detector only available to one player?

So yeah I want to make a click detector only be able to make the mouse hover effect with one player. Would I have to create the click detector using local scripts or is there an easier way? Making it with local scripts might be a problem though because I need to detect it using a server script.

Try creating it from a LocalScript, check if it works.

EDIT: Fire a remote event from the client if it’s active and meets your criteria.

You could make one with a local script and use a remote event for server side changes

With a local script you can probably just change the MaxDistance of the click detector to achieve this.

1 Like

Just check if the player who clicked it is the desired player:

local ClickDetector = -- The click detector
local canClickPlayer = -- The player who can click the click detector

ClickDetector.MouseClick:Connect(function(playerWhoClicked)
    if canClickPlayer == playerWhoClicked then
        -- Do stuff
    end
end)
1 Like

This will give the mouse hover effect to everyone tho

1 Like