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

This SelectionBox isn't coming existent or something?

Asked by 7 years ago

I'm trying to make a tool that, while it is equipped and the player holding the tool's mouse is over an unlocked part, a SelectionBox is created on the part.

It's a LocalScript directly in a tool (without RequiresHandle):

01repeat wait() until game.Players.LocalPlayer ~= nil
02local p = game.Players.LocalPlayer
03 
04local holding
05 
06local mouse = p:GetMouse()
07local target = mouse.Target
08 
09script.Parent.Equipped:connect(function()
10    holding = true
11end)
12 
13script.Parent.Unequipped:connect(function()
14    holding = false
15end)
View all 29 lines...

Answer this question