How to reset StarterPlayer values to default?

This was a hard topic to categories.

I have changed a few values in my StarterPlayer folder such as HealthDisplayDistance and I have no way of resetting it back to default! Is there a way to reset the values in this folder?

image

image

If you’re making a game, you could make a script to reset them when the game loads.

Reinstalling studio resets the default values, but if it’s published, it won’t work.

If you only need to have HealthDisplayDistance changed to default just look up on Google. Which is 100 studs.

local starterPlayer = game:GetService("StarterPlayer")
local starterPlayerProperties = {"HealthDisplayDistance", "NameDisplayDistance", "CameraMaxZoomDistance", "CameraMinZoomDistance", "CameraMode", "DevCameraOcclusionMode", "DevComputerCameraMovementMode", "DevTouchCameraMovementMode", "CharacterMaxSlopeAngle", "CharacterWalkSpeed", "LoadCharacterAppearance", "UserEmotesEnabled", "CharacterJumpPower", "CharacterUseJumpPower", "DevComputerMovementMode", "DevTouchMovementMode", "EnableMouseLockOption", "AutoJumpEnabled"}

--Save current values (defaults).

local defaultValues = {}
for _, starterPlayerProperty in ipairs(starterPlayerProperties) do
	table.insert(defaultValues, starterPlayer[starterPlayerProperty])
end

--Change values here.

--Load and revert back to defaults.

for index, starterPlayerProperty in ipairs(starterPlayerProperties) do
	starterPlayer[starterPlayerProperty] = defaultValues[index]
end

I’ve added comments which should hopefully explain everything. There’s a good chance several of those properties aren’t being changed but I included them for completeness.