You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to set some properties of a function’s parameter which is a humanoid on the server in a modulescript -
What is the issue? Include screenshots / videos if possible!
The issue is that the humanoid seems so be nil even after doing previous line checks -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried to print the humanoid object and it printed humanoid but it didn’t solve anything
function module.FunctionName(hum, data)
--even if i do "if not hum then return end" the humanoid when printed exists, but when trying to modify its nil
print(hum) -- Prints "Humanoid"
hum.WalkSpeed = data.WalkSpeed or 16
hum.JumpPower = data.JumpPower or 50
hum.AutoRotate = data.AutoRotate or true
--some other code
end
Help is appreciated!