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

My clothes script won't work, Why?

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?

1 comment

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

2 answers

✓ Accepted answer

It's supposed to be

game.Teams

not

game.Workspace.Teams

Because the Teams folder is not a part of Workspace.

1 comment

0

:o oh, Thanks.

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

ID=0000000

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

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