I’m looking to make a gui in which you type in a Roblox shirt or pants ID. I’d just need a bump in the right direction for the ID applier.
You mean like, you type in an ID, then it gives your character those clothes?
You could use a Textbox, and a Text Button.
Textbox to put the ID into, text button to apply.
Then have when you press on the text button, it checks the Textbox for the ID. Then assuming your character has clothes already, you could loop through and find any clothes on the character and change the ID.
Check out: InsertService and MarketplaceService.
There are various ways to accomplish said task, using either of those two services.
Secondly, I would establish a remote event system in order for the server to know when the player is attempting to equip a specific asset.
This doesn’t work but there is probably something simple to do to fix it
put this inside of a local script and make the parent of this be a text box call id
script.Parent.FocusLost:connect(
function(enterPressed)
if enterPressed then
print(script.Parent.Text)--the text box that the player enters there id into
game.ReplicatedStorage.ChangeTop:FireServer(script.Parent.Text)x
end
end
)
next add a remote event in replicated storage called ChangeTop
then add a script in ServerScriptService inside of that script put this
local InsertService = game:GetService("InsertService")
game.ReplicatedStorage.ChangeTop.OnServerEvent:Connect(function(plr,topId)
print(topId)
local model = InsertService:LoadAsset(tonumber(topId)) -- it inserts it as a model
model.Shirt.Parent = game.Workspace[tostring(plr)] --this does work how ever
end)
should look something like this
This doesn’t work but there is probably something simple to do to fix it
put this inside of a local script and make the parent of this be a text box call id
script.Parent.FocusLost:connect(
function(enterPressed)
if enterPressed then
print(script.Parent.Text)--the text box that the player enters there id into
game.ReplicatedStorage.ChangeTop:FireServer(script.Parent.Text)x
end
end
)
next add a remote event in replicated storage called ChangeTop
then add a script in ServerScriptService inside of that script put this
local InsertService = game:GetService("InsertService")
game.ReplicatedStorage.ChangeTop.OnServerEvent:Connect(function(plr,topId)
print(topId)
local model = InsertService:LoadAsset(tonumber(topId)) -- it inserts it as a model
model.Shirt.Parent = game.Workspace[tostring(plr)]--this does work how ever
end)
should look something like this
Oh yea, forgot about the remote event. Right. Oops.