I don't want the player not to be able to go backwards only forwards but my code isn't working.
(Output) : ServerScriptService.script:1: attempt to index a nil value
My code:
local Hum = game.Players:GetPlayerFromCharacter(nil).Character.HumanoidRootPart while true do if Hum.Orientation == Hum.Orientation.Unit(0, 163.57, 0) or Hum.Orientation == Hum.Oriention.Unit(0, 54.64, 0) then Hum.Orientation = Hum.Orientation.Unit(0, 0, 0) wait(0.1) end end