Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help to change the character skin every minutes?

Asked by 1 year ago

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

Log in to vote
1
Answered by 1 year ago
Edited 1 year ago

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!

0
TYSM, but I another question, how can I manage the script to work on the player and not the humanoid? Ty in advance!!! wDaerkfeX 37 — 1y
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? LikeableEmmec 470 — 1y
Ad

Answer this question