No idea why, its a server script after all. Thanks.


local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local tools = ReplicatedStorage.Tools

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		wait(1)
		if player.TeamColor.Name == "Bright blue" then
			print "police"
			local cuffs = tools.cuffs:Clone()
			cuffs.Parent = player:WaitForChild("Backpack")
			
			local pistol = tools.pistol:Clone()
			pistol.Parent = player:WaitForChild("Backpack")
			
			local tazor = tools.tazor:Clone()
			tazor.Parent = player:WaitForChild("Backpack")
			
			local card = tools.card:Clone()
			card.Parent = player:WaitForChild("Backpack")
		elseif player.TeamColor.Name == "Bright orange" then
			print "prisioner"
			local cuffs = tools["steal card"]:Clone()
			cuffs.Parent = player:WaitForChild("Backpack")
		end
	end)
end)


2 comments

0

There should be no reason why this doesnt work in your game but it does in studio. Did you actually publish the game? Save does nothing

0

The police seem to get their tools always but the prisioners only in studio even if I formatt is diffrentlty.