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

Creating a shirt, giving it an ID but still doesn't work?

Asked by
Kymaraaa 116
7 years ago
local character = game.Players.LocalPlayer.Character -- the player in the workspace
local augmaActivated = false 


local function Activate(inputObject, gameProcessedEvent)
    if  augmaActivated == true and inputObject.KeyCode == Enum.KeyCoutde.Q then
            print("closing")
            script.Parent.Frame.Visible = false
            augmaActivated = false
    else if inputObject.KeyCode == Enum.KeyCode.Q then 
            script.Parent.Frame.Visible = true
            augmaActivated = true

            Instance.new("Shirt", character).Name = "Shirt"
            character.Shirt.ShirtTemplate = "rbxassetid://676316362"


            print ("opening")
        end
    end
end



game:GetService("UserInputService").InputBegan:connect(Activate)

This is my code, it inserts a Shirt and gives it an ID. It does this, the shirt in the player has the ID. But it doesn't appear on my character? I'm testing it when I have no shirt/pants so I don't need to destroy original Shirt/Pants yet.

0
When I looked up the asset id, it was a game. Sometimes you have to subtract a few more digits for the image to be retrieved correctly. antonio6643 426 — 7y
0
subract 1 off the last digit in line 14. Make it 676316361 tonyv537 95 — 7y

Answer this question