How could I change this?

I have this script that loads a character onto a rig based off an id input:

local id = idhere
local dummy = workspace.Dummy

local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)

dummy.Humanoid:ApplyDescription(newHumanoidDescription)

I wanted to know, how could I change this so instead of making it the id of the person, it’s would get the id of the user in the game, and apply that description onto the rig. Thank you!

1 Like

I don’t really understand what you mean? Can we have some details?

Assuming this is a LocalScript, you could get the ID of the player in-game using game.Players.LocalPlayer.UserId and get the description from that

Is there a specific place I should put this script? Thank you so much.

I’m talking about the character loading like in the game “Beat Up Simulator”
https://www.roblox.com/games/5133040469

Whereas in the game you can load someone’s avatar onto a rig. Except I want it to just load the player in the game straight onto the rig, without typing their username.

Update: I figured it out!

If anyone ever finds this and wants to know, here’s the script I used, I put it in ServerScriptService:

local dummy = workspace.R15

game.Players.PlayerAdded:Connect(function(player)
	local id = player.UserId
	local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)

	dummy.Humanoid:ApplyDescription(newHumanoidDescription)
end)
1 Like