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.
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