Uniform System problem

Hey! I am working on my game and I want to introduce a ProxmityPrompt in coathanger that gives uniform, something like this:


I have already found the OnTrigger in documentation, but I am looking for a efficient script that is working with this kind of feature.

thanks for any help

Something like this? I haven’t tested this on the studio there might be some errors…

 local ShirtID = 0 -- Shirt ID here
 local PantsID = 0 -- Pants ID here

ProximityPrompt.Triggered:Connect(function(player)
     local Character = player.Character
     if Character:FindFirstChild("Shirt") then
         Character:FindFirstChild("Shirt").ShirtTemplate = ShirtID
     else
          local newShirt = Instance.new("Shirt",Character)
          newShirt.Name = "Shirt"
          newShirt.ShirtTemplate = ShirtID
     end

     if Character:FindFirstChild("Pants") then
             Character:FindFirstChild("Pants").PantsTemplate = PantsID
     else
          local newShirt = Instance.new("Pants",Character)
          newShirt.Name = "Pants"
          newShirt.PantsTemplate = PantsID
    end
end)

Let me test it out and check how it works out

Nope, won’t work. Something’s up with my scripts or with my settings propably.

This is supposed to go on a server script, if you’re using a Local Script you will have to use an event.

uniforms with prox.rbxl (30.4 KB)
I made this plot, it’s working for me, try to copy the little neon part (“InteractPart”) into your game

1 Like