Hi, I am currently working on a cafe game and I want that only the Barista-Team has a job outfit. How do I make the Costumer-Team have their own clothing? This is what my script looks like now:
local ss = game:GetService("ServerStorage") game.Players.PlayerAdded:Connect (function (player) player.CharacterAdded:Connect (function (character) if player.Team == game.Teams.Barista then local shirt = character:WaitForChild("Shirt") local pants = character:WaitForChild("Pants") shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=000000" pants.PantsTemplate = "http://www.roblox.com/asset/?id=00000" local hat = nil hat = ss:WaitForChild("hat"):Clone() local hum = character:WaitForChild("Humanoid") hum:AddAccessory(hat) end end) end)
local ss = game:GetService("ServerStorage") local Teams = game:GetService'Teams' game.Players.PlayerAdded:Connect (function(player) player.CharacterAdded:Connect (function (character) if player.Team == Teams.Barista then local shirt = character:WaitForChild("Shirt", 5) local pants = character:WaitForChild("Pants", 5) if shirt and pants then -- pretty sure avatars can be made without clothes shirt.ShirtTemplate = "000000" -- pretty sure just need id not link pants.PantsTemplate = "00000" else Instance.new('Shirt', character).ShirtTemplate = '000000' Instance.new('Pants', character).PantsTemplate = '00000' end local hat = nil hat = ss:WaitForChild("hat"):Clone() local hum = character:WaitForChild("Humanoid") hum:AddAccessory(hat) elseif player.Team == Teams.Customer then -- if not barista then check for customer -- give customer clothing (can be same as Barista with dif id) end end) end) {"mode":"full","isActive":false}