Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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.

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. SkinnyGrumpyDOGE 0 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

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

Ad
Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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

Answer this question