Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Saving bodyscale when they reset?

Basically i have this roleplay game.

When you go through a "kids" portal. It sizes your bodyscale smaller then a adult size.

But when they reset, it wont save and it will go to default scaling size.

How can i prevent this? or make a script to stop it.

1 answer

You could use the GetPlayerFromCharacter function to get the player of whoever touched the portal, and then clone a script that re-resizes them into the StarterGear folder of their player.

so something like

script.Parent.Touched:connect(function(hit)

	local hitPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)
	
	if hitPlayer then

		local rs = script.ResizeScript:Clone()

		rs.Parent = hitPlayer.StarterGear

		-- stuff to resize the player here as well so they get resized before they die as well

	end

end)

That way, when they respawn, they get resized again.

1 comment

0

That's a little too complex. Couldn't I just add a localscript in starterplayerscript and go from there. If so, it does not work and it gives no error at all.

This discussion is preserved as it was. New answers, comments, and votes are closed.