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

Creating a mining game with FE?

So i just need some clarification. How do you get the mouse with FE? When the player has the tool equipped I want a selection box around the block that their mouse is over, is that client or server sided? Creating blocks I would have to do a remote event right?

2 comments

0

Can’t get the mouse from the server. You can get the target, and hit from it though as parameters.

0

seeing that a selection box would be wanted to see only by the player that it's useful for, i'd use a localscript.

1 answer

✓ Accepted answer

FilteringEnabled essentially forces server wide changes made by a client to be run through the server rather than directly to other clients.

This means if inside a LocalScript, you create a new block instance, that block instance will only be seen by the client who ran it.

If you'd like to get the mouse with FE, you'd just use a LocalScript and do:

local localPlayer = game.Players.LocalPlayer
local localMouse = localPlayer:GetMouse()

Selection boxes are generally only client side, unless you want everyone to see everyone else's selection boxes. This means you should create a new selection box instance inside of a LocalScript.

Creating blocks that other users can see would have to be done through a server - this can mean using a remote event and listening for that event to fire on the server, which then creates the block on the server sided script.

Hope this helps.

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