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

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

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

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

mouse.TargetFilter = workspace:FindFirstChild("Select")

2 comments

0

or waitforchild(), but yes your soloution does work.

0

*should- not does.

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