I have a localscript that changes the size of the player as soon as they join (doesn't need to be replicated)
players = game:GetService("Players")
player = players.LocalPlayer
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid.AutomaticScalingEnabled = false
humanoid.HeadScale.Value = .1
humanoid.BodyDepthScale.Value = .1
humanoid.BodyWidthScale.Value = .1
humanoid.BodyHeightScale.Value = .1
humanoid.AutomaticScalingEnabled = true
(For some reason I have to set automaticscaling to false and then set it to true again for the scale to apply)
However, due to having to wait for the character to load, there’s a noticeable delay after spawning before the size change happens. Is there a way I can somehow either get this script (and by extension the player character) to load faster, or, preferably, set the humanoid body scale defaults?
Do player.CharacterAdded and wait for the humanoid.
You can do this in two ways, probably more but these are the ones I can think of off the top of my head:
1st option: Game settings > Avatar > scroll down to Scale and adjust the settings there. The only thing with that, though, is that you’re constrained to proportions allowed on the Roblox avatar editor.
The second option is a more manual approach but if your main concern is that the character is going to be way too big for a brief moment, this will ensure that doesn’t happen.
1- Build an R15 rig using the rig builder
2- Manually adjust proportions inside the humanoid.
3- Rename the rig to “StarterCharacter”, parent it to StarterPlayer like so:
4- Write a script to get the humanoid description for whomever owns the character, parent this script to StarterCharacterScripts.
local players = game:GetService('Players')
local character = script.Parent
local player = players:GetPlayerFromCharacter(character)
local userId = player.UserId
local success, humanoidDescription = pcall(players.GetHumanoidDescriptionFromUserId, players, userId)
if not success then
warn('Failed to get HumanoidDescription for', userId, 'because', humanoidDescription)
-- now let's remove the scaling
humanoidDescription.HeadScale = 0.1
humanoidDescription.DepthScale = 0.1
humanoidDescription.WidthScale = 0.1
humanoidDescription.HeightScale = 0.1
humanoidDescription.BodyTypeScale = 0.1
humanoidDescription.ProportionScale = 0.1
5- profit (observe that when I respawn my character isn’t giant for a brief moment, it’s always tiny)
Here’s a copy of the place in the aforementioned video:
tinyChar.rbxl (67.5 KB)
Thanks, I can skip the last steps since it’s singleplayer and locked first person.
I wasn’t aware you could place models in the starterplayer like that.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.