MaxHealth and walk speed script is not working

You’re trying to get the Value of MaxHealth, which isn’t how properties work. Take it this way: a humanoid is an object with properties like WalkSpeed and MaxHealth, and when you read those properties they are numbers. Numbers cannot have properties like “Value.” Value is a property of things like NumberValues and BoolValues etc.

Eureka! I got the script working but it only applies when the value changed and not on spawn.

edit: it now totally works but an error is still outputted regardless.

Add this line to the end of the script:

onPlayerRespawned()

The CharacterAdded event fires when the character is spawned, but the script runs after the character has already spawned. By adding this line, you are running the function after connecting it to undo that problem.

1 Like