PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Scripting Book/Chapter 17: Code Sample 2

Scripting Book/Chapter 17: Code Sample 2

Oct 01 2018, 3:03 AM PST

local tool = script.Parent
local user
script.Parent.Equipped:Connect(function(mouse)
     mouse.Button1Down:Connect(function()
          local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p -  tool.Handle.CFrame.p).unit*300)
     end)
end)