Turn this script into a click to morph?
I would really appreciate if someone could help me out with turning this touch to morph script, into a click to morph script.
01 | function onTouched(hit) |
02 | if hit.Parent:findFirstChild( "Humanoid" ) ~ = nil and hit.Parent:findFirstChild( "HandLeft" ) = = nil then |
03 | local g = script.Parent.Parent.HandLeft:clone() |
05 | local C = g:GetChildren() |
07 | if C [ i ] .className = = "Part" or "MeshPart" then |
08 | local W = Instance.new( "Weld" ) |
11 | local CJ = CFrame.new(g.Middle.Position) |
12 | local C 0 = g.Middle.CFrame:inverse()*CJ |
13 | local C 1 = C [ i ] .CFrame:inverse()*CJ |
18 | local Y = Instance.new( "Weld" ) |
19 | Y.Part 0 = hit.Parent.LeftHand |
21 | Y.C 0 = CFrame.new( 0 , 0 , 0 ) |
25 | local h = g:GetChildren() |
28 | h [ i ] .CanCollide = false |
34 | script.Parent.Touched:connect(onTouched) |