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

Copy tool not working right? [closed]

Asked by 9 years ago

cloning = false local Targ local targClone local Dragger function onClone(mouse) if not cloning then cloning = true Targ = mouse.Target targClone = Targ:Clone() targClone.Parent = game.Workspace targClone.Position = Targ.Position + Vector3.new(0,.4,0) Dragger = Instance.new("Dragger") pcall(function() Dragger:MouseDown(targClone, Vector3.new(0, 0, 0), {targClone}) end) cloning = false end end function onMove(mouse) if Dragger then pcall(function() Dragger:MouseMove(targClone.UnitRay) end) else print(pcall(function() Dragger:MouseMove(targClone.UnitRay) end)) wait(10) end end function onSelect(mouse) mouse.Button1Down:connect(function() onClone(mouse) end) mouse.Move:connect(function() onMove(mouse) end) end script.Parent.Selected:connect(onSelect)

This script is for a copy tool Im working on and its saying the Dragger value = nil, I don't understand why the value is nil.

0
I have corrected the issue, I accidently wrote (targClone.UnitRay), I fixed it to say (mouse.UnitRay) and it works correctly now! AncientEdits 30 — 9y

Locked by EzraNehemiah_TF2 and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?