heres my script
game.Players.PlayerAdded:Connect(function(p)
mouse = p:GetMouse()
distance = 15
mouse.Button1Down:Connect(function()
ray = Ray.new(mouse.hit.p,(mouse.hit.p - p.Character.UpperTorso.CFrame.p).unit * 2)
hit,pos = workspace:FindPartOnRay(ray,p.Character,false,true)
line = Instance.new("Part",workspace)
line.BrickColor = BrickColor.new("Really red")
line.Anchored = true
line.CanCollide = false
line.Transparency = 0.3
line.Name = "Line"
local dir = (p.Character.UpperTorso.CFrame.p - pos).Magnitude
line.Size = Vector3.new(0.3,0.3,dir)
line.CFrame = CFrame.new(p.Character.UpperTorso.CFrame.p,pos) * CFrame.new(0,0,-dir/2)
print("done")
end)
end)
i really dont know what im doing wrong lol
ps: the part where it says like .unit * 2 doesent work i use to but not any more
