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

My clothes script won't work, Why?

Asked by 10 years ago
local fighters = game.Workspace.Teams.Fighters
local defenders = game.Workspace.Teams.Defenders
plr = game.Workspace.LocalPlayer

    fighters.Shirt.ShirtTemplate = "http://www.roblox.com/Red-item?id=157673817"
    fighters.Pants.PantsTemplate = "http://www.roblox.com/Pants-item?id=157684158"
    if plr.fighters == true then
        plr.fighters.Shirt.ShirtTemplate:Destroy()
        plr.fighters.Pants.PantsTemplate:Destroy()
        wait(3)
        plr.fighters.Shirt.ShirtTemplate = "http://www.roblox.com/Red-item?id=157673817"
        plr.fighters.Pants.PantsTemplate = "http://www.roblox.com/Pants-item?id=157684158"
        defends.Shirt.ShirtTemplate = "http://www.roblox.com/Blue-item?id=157673856"
        defends.Pants.PantsTemplate = "http://www.roblox.com/Pants1-item?id=157684213"
        if plr.defenders == true then
            plr.defenders.Shirt.ShirtTemplate:Destroy()
            plr.defenders.Pants.PantsTemplate:Destroy()
            wait(3):Destroy()
            plr.defenders.Pants.PantsTemplate = "http://www.roblox.com/Pants1-item?id=157684213"
            plr.defenders.Shirt.ShirtTemplate = "http://www.roblox.com/Blue-item?id=157673856"
    end
end

It when your on defenders team, you get the uniform, when your on fighters, you get the uniform. Works on solo but not ingame. Why?

0
I think it would be a LOT easier if you use 'rbxassetid://' instead of "http://www.roblox.com/Blue-item?id=".. http://wiki.roblox.com/index.php/Content Nickoakz 231 — 10y

2 answers

Log in to vote
0
Answered by
Resnex 60
10 years ago

It's supposed to be

game.Teams

not

game.Workspace.Teams

Because the Teams folder is not a part of Workspace.

0
:o oh, Thanks. Roboy5857 20 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

If you mean the clothes, you did the http:// wrong.

ID=0000000

script.Parent.Shirt.ShirtTemplate="http://www.roblox.com/asset/?id="..ID

Answer this question