#need help with changing a player clothes

33 messages · Page 1 of 1 (latest)

blazing matrix
#

i want to make a player change clothes when he click on a imagebutton
i added a localscript inside of the button and put the following codes :

`local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function(player)
local Shirt = "http://www.roblox.com/asset/?id=6345106575"
local Pants = "http://www.roblox.com/asset/?id=8194595340"

local PlayerShirt = game.Workspace:FindFirstChild(player.Name).Shirt
local PlayerPants = game.Workspace:FindFirstChild(player.Name).Pants

PlayerShirt.ShirtTemplate = Shirt
PlayerPants.PantsTemplate = Pants 

end)`

but when i click on the imagebutton it does nothing , any help??

pliant blaze
#

so make it script.Parent.MouseButton1Click:Connect(function()

#

@blazing matrix

alpine dagger
#

So how many cloths and pants are

pliant blaze
#

You need too or else it's nil

alpine dagger
blazing matrix
#

okay let me try

#

THANK YOU SO MUCH @pliant blaze

#

IT WORKS

alpine dagger
blazing matrix
#

8 buttons

alpine dagger
#

Just do a loop

#

K

blazing matrix
#

Each button have differant shirt and pants

alpine dagger
#

It’s the same I’m going to make a loop for u

blazing matrix
#

Okay ty

alpine dagger
#

So it’s in one script

#

Not 8

blazing matrix
#

Yeah I see

alpine dagger
#

Ok go to cloths add 2 name 1 Shirt and the other pants

#

Get the id of the clothes then bam ur done with that step but then I need to recreate the loop to delete pants and shirt then reclone the new cloths to the player

alpine dagger
blazing matrix
#

Actually I want to do something else

The kit menu look like this , but I want to make it when I open the menu , it show barcelona logo between 2 arrows and then when I click to the Right arrow it switch to Madrid ect...

#

Like a selection

#

Idk how I can do that

#

@alpine dagger

pliant blaze
pliant blaze
pliant blaze
#

so basically, make a table with the numbers that they are placed in, then add their names or instance, and you can use the stuff with that