So I am making a SWAT related game and was wondering when a player joins how do I make it auto give them the proper clothing, vest, hat and night vision goggles.
Here is the items I want it to auto put on the person, I have the three models and the clothing ids, can someone make the script or help me make the script?
for the cloths just go to game setting and go to the avater place, for the gears you can use a script to place a weld constriant on the player
and how would I script that? Same with clothing I want it all done via script
for the clothing
local function replaceClothes(player)
local character = player.Character
if character then
local shirt = character:FindFirstChildOfClass("Shirt")
local pants = character:FindFirstChildOfClass("Pants")
if not shirt then
shirt = Instance.new("Shirt", character)
end
if not pants then
pants = Instance.new("Pants", character)
end
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=idkwhatsurid?"
pants.PantsTemplate = "http://www.roblox.com/asset/?id=idkwhatsurid?"
end
end
1 Like
and for the models like the gear stuff?
I guess that tutorial might be good for what you’re asking for, however I’d suggest to rotate the vest to the original rig facing position and blah blah, those are basic things you can find in any tutorial.
Team Hats: How to Add Accessories Based on Teams in Roblox