#Problem with setting AutoRotate
54 messages · Page 1 of 1 (latest)
local char = Player.Character
if char then
local succ, err = pcall(function()
char.Humanoid.AutoRotate = Parametrs[2]
end)
if not succ then
return err
end
end
Parametrs[2] is string(true/false) or number(0/1)
string that’s true or false? Why not a boolean?
Isn’t autorotade a bool?
Why not ToBool it
Humanoids tend to be odd in roblox
We have to loop a script to make it so certain parts of the body stay visible in first person
uh
Also, why return the error code?
cuz I made my own error handling
can any of you help me with this game
so admin could see error
- I have webhook saving
so if errors accour it auto send to discord
so I could repair it later
xpcall has some warning customisation, maybe look into that
Anyways, does it return err or return nothing?
I mean
it didnt worked
but every line were executed
Well pcall doesn’t give a normal error unless you print errr. (Or read it some other way)
Hmh
it could be roblox studio error
Most likely not. Maybe try to change it manually and see if it works with a normal string
so use the commandbar and type
game.Players.(yourname).Character.Humanoid.AutoRotate = “false”
yh string and numbers doesnt work
Use ToBool (or however you spell it)
there is no to bool function
hang on
I could create my own
I swore toboolean was in luau as well
Had to google the full name, can’t find any luau sources on it
function tobool(v)
return v and ( (type(v)=="number") and (v==1) or ( (type(v)=="string") and (v=="true") ) )
end
A function to change it manially
Oh, welp now you have 2