Clothing mannequin not fully working - Other users cant see what I try on and their prompt doesn't work

Hiya, so I have a homestore and my clothing mannequin will only show clothes I try on for myself and other players wont be able to see what I try on.
Also, only myself can buy the clothes, when anyone else clicks the buy button on the GUI it doesn’t prompt them with the link to the peice of clothing.

This is how it looks on the NPC
image

This is the starterGUI
image

This is what is inside the localscript

Would anyone be able to help me make it so when someone tries on clothing it will allow other players to see what they tried on and also make it so the buy prompt works for other people, thanks.

(Repost as other topic glitched out)

1 Like

You would have to use remote events for this because of client → server communication and replication

1 Like

For other players to see you trying on clothes you need to separate the trying on clothes code and put it into a script instead of a local script. The prompt purchases also needs to be fired by the server instead of from a local script. you can use a remote event like the example from this page MarketplaceService:PromptPurchase

1 Like

The issue is that you are changing them with a Local Script. Since FilteringEnabled is Enabled, changes made on the client do not replicate to the server. You need to set up a system that fires off Remote Events to tell the server what the character looks like now.

Would you be able to help in doing that? I’m not the best at scripting :sweat_smile:

example code:

-- client/local script
local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") -- get the remote event

TryButton.MouseButton1Click:Connect(function()
    -- "TryButton" would be the button to try on the clothing
    -- this event fires an event to the server to let other players see the clothing when someone tries it on

    remote:FireServer(...)
    -- "..." would be the arguments you pass through the event (shirt id, pants id, etc)
    -- basically like how you would normally call a function with parameters
end)
-- server/script
local remote = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvent") -- get the remote event

remote.OnServerEvent:Connect(function(player, ...) -- detect the event from the server
   -- the "..." would be whatever you sent through the remote
   -- this remote function will assign the clothing to the player when they click the "try" button
   -- roblox automatically passes the player who fired the remote as the first parameter

   local character = player.Character or player.CharacterAdded:Wait() -- this gets the player's character
   -- do stuff
end)

I tried to do it although it still wont work at all and has the same issue, I don’t think I did it right and I don’t know how else to do it :sweat_smile: