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

Mannequin Try On feature problem?

Asked by 2 years ago

I'm encountering some problems with a TryOn function that I'm using in my mannequin system. The main issue is that after the remote used for trying on clothing gets called once it sort off breaks and whenever I try to try on other clothing It equips the player with both the Shirt and the Pants of the mannequin instead of only one of them-- in my debug script it prints both Shirt and Pants instead of only one of them. Here's the main function:

01local function TryOn(p, player, ClothingId, Action)
02    if Action == "Wear" then
03        print("ACTION: wear clothing.")
04 
05        local ClothingType = MarketplaceService:GetProductInfo(ClothingId).AssetTypeId
06 
07        --- 11 is the AssetType Id for Shirts
08        --- 12 is the AssetType Id for Pants
09        if ClothingType == 11 or Enum.AssetType.Shirt then
10            print("Shirt") --/ equip player shirt, print function for debugging
11        elseif ClothingType == 12 or Enum.AssetType.Pants then
12            print("Pants") --/ equip player pants, print function for debugging
13        end
14    elseif Action == "Reset" then
15        print("ACTION: reset.")
View all 21 lines...
0
Can you show the local script that use `TryOnEvent:FireServer()`? T3_MasterGamer 2189 — 2y
0
TryOn.MouseButton1Click:Connect(function() TryOnEvent:FireServer(Player, CLOTHING_ID, "Wear") end) Daffydavinko 0 — 2y

Answer this question