Ray attempt to call a nil value

Hey, I got a really weird ray problem on my hand and for the love of god I can’t figure out what’s wrong, everything looks right no typos nothing just take a look.

local HumanoidRoot = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local RAY = Ray.New(HumanoidRoot.Position, Vector3.new(HumanoidRoot.CFrame.LookVector.X*130 , 1 , HumanoidRoot.CFrame.LookVector.Z*130))

I made it based on a guide but on their side, everything just works.

Lua scripting is case-sensitive. The .new constructor uses lowercase letters.

Try changing Ray.New to Ray.new.

1 Like

i was staring and this darn thing for 15 min and didnt see it …

1 Like