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

I need help to change the character skin every minutes?

Hey guys I am creating a game when every minutes the character change apparence to another (it load random id of players), for example for 1 minute I can have the skin of haz3mn... so I have created this script but on a humanoid:

wait()
local id = math.random(1,1000000000)
local hum = script.Parent.Humanoid

local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)

hum:ApplyDescription(newHumanoidDescription)

but the script dont change the apparance every minutes, and, I dont know how to manage this script for the player, I hope ypu can help me!

1 answer

I would put it in a simple loop. You can change it to wait every 60 seconds, then change the ID again.

wait()

local id = math.random(1,1000000000)
local hum = script.Parent.Humanoid

local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)

hum:ApplyDescription(newHumanoidDescription)

while wait(60) do
	local id = math.random(1,1000000000)
	local hum = script.Parent.Humanoid

	local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)

	hum:ApplyDescription(newHumanoidDescription)
end

Hope this helps!

2 comments

0

TYSM, but I another question, how can I manage the script to work on the player and not the humanoid? Ty in advance!!!

0

I don't quite understand, are you using this for like a non-player character? If so, you can insert a script into StarterCharacterScripts and paste this code. If it isn't, could you explain further?

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