Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help with "attempt to index nil with 'CFrame' " ERROR?

So im making a wall running script with velocity and speed gain/loss and it works great, but when youre doing the wall running and stop like jumping of or you lose your velocity it shows up the "attempt to index nil with 'CFrame' " I did not script anyhting for this so i do not know what is should do.

1 comment

0

so to expand on my question further i use BodyVelocity and BodyGyro to have it stick you to the wall and change speed accordngly, it removes it after you get off the wall but for some reason if you jump off or stop accelerating (pressing w) and just fall off it pops up with this error.

2 answers

this par tof the code is the part where the error shows

if hold then Gyro.CFrame = HRP.CFrame Gyro.MaxTorque = Vector3.new(1,1,1) * math.huge Velocity.MaxForce = Vector3.new(1,1,1) * math.huge hold = false if part then Velocity.Velocity = cross * Humanoid.WalkSpeed left = true elseif part2 then Velocity.Velocity = -cross2 * Humanoid.WalkSpeed right = true end end

CFrame i think it cause u forgot the put a .here Gyro.MaxTorque = Vector3.new(1,1,1) * math.huge

CFrame.Gyro.MaxTorque = Vector3.new(1,1,1) * math.huge

This discussion is preserved as it was. New answers, comments, and votes are closed.