Hey guys!
I have this script here where if you click on the GUI, it gives you the outfit. It works fine in Studio test mode, but not in-game. Does anyone see an error with my code?
script.Parent.MouseButton1Down:connect(function()
playername = script.Parent.Parent.Parent.Parent.Name
playerteam = script.Parent.Parent.Parent.Parent
player = Workspace:FindFirstChild(""..playername.."")
if player ~= nil then
player:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=267460168"
player:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=267460509"
end
end)
Thanks in advanced,
Michael

3 comments
If this is in a Localscript, try it in a regular script, and vise versa .
Cheers, that worked! Put it as an answer and I'll accept it! :3
Ah ok, lol. Glad to help :P