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.
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.