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

How do i get a random shirt for a npc? (FE)

Asked by 5 years ago

My attempt

shirts = {650162633}

local randomshirt = math.random(1,#shirts)
local clothing = script.Parent.Clothing

clothing.ShirtTemplate = 'http://www.roblox.com/asset/?id=' ..randomshirt
0
And yes i know theres only one shirt (just showing the shirt is the issue) SamthekidRSsl 58 — 5y

1 answer

Log in to vote
0
Answered by
Simnico99 206 Moderation Voter
5 years ago

You forgot to mention the table so it's shirts[randomshirt]

shirts = {650162633}

    local randomshirt = math.random(1,#shirts)
    local clothing = script.Parent.Clothing

    clothing.ShirtTemplate = 'http://www.roblox.com/asset/?id=' ..shirts[randomshirt]
0
-facepalm- to me lol SamthekidRSsl 58 — 5y
0
Haha it is okay :P Simnico99 206 — 5y
Ad

Answer this question