Hello, I got the error in the title while trying to RayCast, here is the script:
local HumanoidRootPart = Player.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local RayDirection = HumanoidRootPart.CFrame * CFrame.new(0,0,Settings.RenderRange)
local Result = workspace:Raycast(HumanoidRootPart.Position, RayDirection)
The code are located in a local script and I am using remote event to send the data to two seperate server script.