Heres my code... I tried editing it, but then it ends up not working.
wait(0.1) local player = game.Players.LocalPlayer local mouse = player:GetMouse() local blankPart = game.Players.LocalPlayer.PlayerGui.BlockGui.Block.Part blankPart.Anchored=true blankPart.CanCollide=false blankPart.Transparency=0.75 while true do wait(0.2) local part = blankPart:Clone() --never change the original part, only a clone part.Parent=workspace mouse.TargetFilter=part --ignore the clone while getting mouse position local p = mouse.Hit.p part.Position = Vector3.new(math.floor(p.X),math.ceil(p.Y),math.floor(p.Z)) --mouse position in whole numbers mouse.Button1Down:wait() --do not have to connect a click function :) part.CanCollide=true part.Transparency=0 end
what ou must do is make it so when equipped it works then when .unequipped it doesnt work, to do this, use two scripts, one is equipped, one unequipped (names)both start disabled = false(enabled), so enabled named if you want script is
-script.Parent(tool).Equipped:connect(function() (whaever it does here, or if its another script the building is in do this:)
-script.Parent.Equipped:Connect(function() script.Parent.BuildScript(or whatever its called).Disabled = false(enables it) script.Disabled = true(disables current script)
REMEMEBR, DISABLE THE CURRENT SCRIPT AFTER, IF FIRST IT WONT DO NEXT LINES OF SCRiPT!!! and unequipped script says something like
-script.Parent.Unequipped:connect(function() while true do(keeps checking every time) if script.Parent.Equipped then (if equipped triggers this->) script.Parent.equipped.Disabled = false (enables) (REMEMEBER DISABLE CURRENT SCRIPT LAST!! LAST LAS LAST!!!!!:( )' script.Disabled = true else script.Parent.Buildscript(for example).Disabled = true(it wont work now) wait(.1) end
Im a little off today, its late and im lazy and its hard to think, but hope this helps :) -Noob189012, experianced scripter and builder
Hello, use .Activated instead of mouse.Button1Down.
Here is the roblox documention