Hi, I wish for my script to ‘save’ the value of the players WalkSpeed, to then recall later in the script when that WalkSpeed value has changed to something else - so that I am able to revert the players WalkSpeed to its original value after the changes. How would I do this? thanks!
1 Like
Attributes are great for this kind of thing. You can add one to the humanoid with the old WalkSpeed (or player if the change last’s after respawn) and then remove it again when you want to reset it.
-- to set
humanoid:SetAttribute("OriginalWalkSpeed", humanoid.WalkSpeed)
humanoid.WalkSpeed = newValue
-- to reset
humanoid.WalkSpeed = humanoid:GetAttribute("OriginalWalkSpeed")
humanoid:SetAttribute("OriginalWalkSpeed", nil)
4 Likes
This is perfect! all works great now. Thanks so much for the quick response to my very first post 
2 Likes