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

How do i get this button to work?

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

2 answers

Log in to vote
0
Answered by 8 years ago
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)

Ad
Log in to vote
0
Answered by 8 years ago

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)

Answer this question