So I'm making a clothing game test where I want people to test the clothing I make. When I make a event that calls it publicly it shows the player as without a shirt/pants. I'm not sure why this is happening even tho I did everything right.
If you could help or just tell me what to do I would be grateful!
The Local Script I use to fire from Shirt button is:
-- locals:
local Button = script.Parent
local localPlr = game.Players.LocalPlayer
local PutClothingEvent = game.ReplicatedStorage.Events.PutClothingEvent
local Id = script.Parent.Parent.Parent.ShirtId
Button.MouseButton1Click:Connect(function()
if localPlr.Character:FindFirstChild("Shirt") then
PutClothingEvent:FireServer("Shirt", "http://www.roblox.com/asset/?id="..Id.Value)
else
wait()
end
end)
I used "http://www.roblox.com/asset/?id=" by the fact it showed in game like that. But it doesn't seem to appear
The other Local Script I use to fire from Pants button is:
-- locals:
local Button = script.Parent
local localPlr = game.Players.LocalPlayer
local PutClothingEvent = game.ReplicatedStorage.Events.PutClothingEvent
local Id = script.Parent.Parent.Parent.PantsId
Button.MouseButton1Click:Connect(function()
if localPlr.Character:FindFirstChild("Pants") then
PutClothingEvent:FireServer("Pants", "rbxassetid://"..Id.Value)
else
wait()
end
end)
Same with "rbxassetid://" I used it and never appeard.
My Remote Event:
PutClothingEvent.OnServerEvent:Connect(function(localPlr, clothingType, clothingId)
if clothingType == "Shirt" then
local NewShirt = Instance.new("Shirt", localPlr)
NewShirt.Name = "Shirt"
localPlr.Character.Shirt:Destroy()
NewShirt.ShirtTemplate = clothingId
print(localPlr, "has just put on some shirt.")
else
local NewPants = Instance.new("Pants", localPlr)
NewPants.Name = "Pants"
localPlr.Character.Pants:Destroy()
NewPants.PantsTemplate = clothingId
print(localPlr, "has just put on some pants.")
end
end)
What I used should work, but I'm not sure if it is ROBLOX's fault or I did something wrong.
I tried my best explaining the best I could, but if you can help thank you!

2 comments
Sorry for the late response, but it doesn't seem to work I'm not sure why
are you sure your 'clothingId' is valid, also try using rbxassetid://