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

any1 know how to fix this script ? ive been trying to get a awnser but i didnt get any :(

Asked by 2 years ago
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local down

function clickObj()
    mouse.TargetFilter = workspace.Select
    if mouse.Target ~= nil then
        local mtarget = mouse.Target
            if mtarget.Name == "GrassBlock" then
            mtarget:Destroy()
            end
        down = true
        mouse.TargetFilter = mtarget
    end
end
mouse.Button2Down:connect(clickObj)

function mouseMove()

            wait(0.001)
            game.Workspace.> Select.Highlight.Position = Vector3.new(mouse.Target.Position.X, mouse.Target.Position.Y, mouse.Target.Position.Z)




end
mouse.Move:connect(mouseMove)

the output says select isnt a part of workspace

1 answer

Log in to vote
0
Answered by 2 years ago

are you sure select is part of workspace if it is try adding FindFirstChild

mouse.TargetFilter = workspace:FindFirstChild("Select")
0
or waitforchild(), but yes your soloution does work. jasperagent 43 — 2y
0
*should- not does. jasperagent 43 — 2y
Ad

Answer this question