still makes everyone wear it
LOCAL
Player = game.Players.LocalPlayer
local RemoteEvents = game:GetService("ReplicatedStorage"):WaitForChild("UniformEvents")
local Give = RemoteEvents:WaitForChild("UTouch")
local a = game.workspace.ShirtGiver.Button
debounce = false
a.Touched:connect(function(obj)
if debounce == false then
debounce = true
if obj.Parent:FindFirstChild("Humanoid") then
local char = Player.Character.Name
Give:FireServer(char)
end
wait(1)
debounce = false
end
end)
SERVER
local RemoteEvents = game:GetService("ReplicatedStorage"):WaitForChild("UniformEvents")
local Give = RemoteEvents:WaitForChild("UTouch")
debounce = false
a = game.workspace.ShirtGiver.Button
Shirtid = "h############################################
Give.OnServerEvent:connect(function(player, character)
if player.Character.Name == character then
local char = player.Character
a.BrickColor = BrickColor.new("Deep orange")
repeat wait() until char.Shirt
char.Shirt:Destroy()
local ashirt = Instance.new("Shirt")
ashirt.ShirtTemplate = Shirtid
ashirt.Name = "BaristaShirt"
ashirt.Parent = char
wait(1)
a.BrickColor = BrickColor.new("Electric blue")
end
end)
|