I have a barrier in my game (as to keep non-participating players out) and have ClickDetectors set up on each chair that allows participating players to click on them.
It works, however, if the player’s camera is too far (and out of the barrier) then the player is unable to click on those ClickDetectors.
clickDetector.MouseHoverEnter:Connect(function(player)
print("BLAH");
-- do stuff
end)
I also have a TargetFilter for the Local Player’s mouse as to filter out that barrier, however, that still doesn’t work:
local Players = game:GetService("Players");
local player = Players:LocalPlayer;
local mouse = player:GetMouse();
mouse.TargetFilter = workspace.Objects.Barriers.Barrier;
That’s what I’ve been thinking too. Usually TargetFilter works great for ignoring parts, but I don’t think it works when you’re pressing a ClickDetector on the other side of that part.
Perhaps making it so if the player is participating, set the parent of the barrier to nil on the client, then re-parenting it when they are no longer participating.
Are you making your game based off of Breaking Point? Well, if so then you can have outer barriers that appear when clicking is not required (for the fighting parts I would assume), then are removed when it is required.