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

Why does the button script to put on clothes not work?

I have a problem when putting on my clothes by selecting a button that is located in a Scrolling Frame, I move the script from one gui to another or from one Frame to another and it doesn't work, but if I leave it under Screen Gui it works again, I want to do An Outfit Gui for my mermaid students to try on different outfits but what I find stops working, I look for it on YT and the Roblox library and there is no script that can help me. This is the Gui code that I found in the Library:

``script.Parent.MouseButton1Down:connect(function() playername = script.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=5683603807" --change to the SHIRT you want to wear's id player:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=5683605100" end end)

2 comments

0

Is it a local script or a script?

0

Idk local?

1 answer

  1. It's a local script (I think) so it won't be able to be seen on other player's screens (Server sided cilent sided, remote functions) the script itself look messy and outdated but i guess i fixed it? if its not a local script then everyone should see it and it should be fine
script.Parent.MouseButton1Down:connect(function() playername = script.Parent.Parent.Parent.Parent.Name player = Workspace:FindFirstChild(""..playername.."") if player ~= nil then player:FindFirstChild("Shirt").ShirtTemplate = "rbxassetid://5683603807" --change to the SHIRT you want to wear's id 
player:FindFirstChild("Pants").PantsTemplate = "rbxassetid://5683605100" 
end end)

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