Alright so! I am trying to make a system so where-ever your mouse is pointing a part as made and points towards that but if I keep my mouse still the parts come towards the camera. I have tried position, cframe, anchoring, un-anchoring and none of them work.
Code:
wait(2)
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
local mouse = game.Players.LocalPlayer:GetMouse()
local wplr = game.Players.LocalPlayer.Character
while game:GetService("RunService").Heartbeat:Wait() do
wplr = game.Players.LocalPlayer.Character
mouse.TargetFilter = wplr
workspace.EndPart.Position = mouse.Hit.p
local distance = (wplr.RightHand.Position - mouse.Hit.p).magnitude
workspace.BeamPart.Size = Vector3.new(0.3, 0.3, distance)
workspace.BeamPart.CFrame = CFrame.new(wplr.RightHand.CFrame.p, mouse.Hit.p) * CFrame.new(0, 0, -distance / 2)
end
Thanks for reading have a nice day! c:

3 comments
Line is is a repeat thing you know right?
Line 8*
So, its going to keep on getting bigger...