Hello I need help:
ClickDetector=
Reset Player
ClickDetector=
Remove accessiors from everywhere expect the head accessiors.
Hello I need help:
ClickDetector=
Reset Player
ClickDetector=
Remove accessiors from everywhere expect the head accessiors.
What script I want to make all steps you say
If I click on a part with clickdetector it make a function
Alright, try writing a script and sending it to me.
local detector = script.Parent.ClickDetector
detector.MouseClick:Connect(function()
print("Test")
end)
Nice, alright, so do you know the best way to move accessories?
local pantsId = script.Parent.Parent.Coathanger.Pants.PantsTemplate
local shirtId = script.Parent.Parent.Coathanger.Shirt.ShirtTemplate
local cPart = script.Parent
local cDetector = script.Parent.ClickDetector
local function playSoundLocal(sId,sParent)
local sound = Instance.new("Sound",sParent)
sound.SoundId = "http://www.roblox.com/asset/?id="..sId
sound:Play()
sound:Destroy()
end
local function onClicked(player)
print(player.Name.." clicked on Uniform Giver")
playSoundLocal(152206246,player) -- Declaring the sound ID and Parent
local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
if not foundShirt then -- if there is no shirt
print("No shirt found, creating for "..player.Name)
local newShirt = Instance.new("Shirt",player.Character)
newShirt.Name = "Shirt"
else if foundShirt then -- if there is a shirt
print("Shirt found, reconstructing for "..player.Name)
player.Character.Shirt:remove()
local newShirt = Instance.new("Shirt",player.Character)
newShirt.Name = "Shirt"
end
end
local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
if not foundPants then -- if there are no pants
print("No pants found, creating for "..player.Name)
local newPants = Instance.new("Pants",player.Character)
newPants.Name = "Pants"
else if foundPants then -- if there are pants
print("Pants found, reconstructing for "..player.Name)
player.Character.Pants:remove()
local newPants = Instance.new("Pants",player.Character)
newPants.Name = "Pants"
end
end
player.Character.Shirt.ShirtTemplate = shirtId
player.Character.Pants.PantsTemplate = pantsId
end
local function onHoverEnter(player)
cPart.Transparency = 1
cPart.BrickColor = BrickColor.White()
end
local function onHoverLeave(player)
cPart.BrickColor = BrickColor.Gray()
cPart.Transparency = 1
end
-- Binds --
cDetector.MouseHoverEnter:connect(onHoverEnter)
cDetector.MouseHoverLeave:connect(onHoverLeave)
cDetector.MouseClick:connect(onClicked)
I want to remove all accessiors EXPECT the accessiors on the head like glasses or hat
Did you write this script?
no i got it from toolbox a uniform giver
Alright, with a quick look at this script it only removes the shirt?
It changes the shirt and pants from someone
Yeh, that’s not we want.
yes and in it i want that it changes the shirt, pants (its already) and i want you to add the accessiors remove expect accessiors on head
Accessories are the items worn by an avatar.
Alright, well then we will attempt to do that, but we will need a remote event to link it to the server.
uh im so confused i just want to let all accessiores remove expect the accessiors = Face, Head
Alright, so we’re not changing the clothing?
changing clothes is already in the script so i want only the accessiores from you