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

How do i get this button to work?

                      Onclicked()MouseButton
		PantsId = "http://www.roblox.com/asset/?id=188092301",
		ShirtId = "http://www.roblox.com/asset/?id=188092254",
		TShirtId = nil,
                   OnClicked()Gui

2 answers

local button = PUT_WHERE_THE_GUI_IS_HERE    --Reminder. This must be a textbutton
         
function Onclicked()
PantsId = "http://www.roblox.com/asset/?id=188092301",
ShirtId = "http://www.roblox.com/asset/?id=188092254",
TShirtId = nil,
end

button.MouseButton1Click:connect(OnClicked)

this should work because you didn't assess the player for it to change the Shirt Id and Pants Id.

local button = PUT_WHERE_THE_GUI_IS_HERE    --Reminder. This must be a textbutton
local plyr = game.Players.LocalPlayer.Character
function Onclicked()
plyr.Pants.PantsId = "http://www.roblox.com/asset/?id=188092301",
plyr.Shirt.ShirtId = "http://www.roblox.com/asset/?id=188092254",
end

button.MouseButton1Click:connect(OnClicked)

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