Idea This Script is made to clone everything in a model and put it into the players character when they change teams, Any it worked Fine :D (In Studios)
Problem I tried to use this script in game, and it would not do anything, and gave no outputs.
Code:

------------------------------------
plr = game.Players.LocalPlayer
char = plr.Character
--------------------------
DiverModel = game.ReplicatedStorage.CharacterList.Diver
----------------------------------------------------------------------
repeat wait() until  char ~= nil and plr.TeamColor ~= BrickColor.new("White")
----------------------------------------------------------------------
function GiveParts(Model)
	for _, Object in pairs(Model:GetChildren()) do
		Object:Clone().Parent = char
	end
end
--------------------
function OnChanged()
if plr.TeamColor == BrickColor.new("Crimson") then
	GiveParts(DiverModel)
elseif plr.TeamColor == BrickColor.new("Quill grey") then
	GiveParts(DiverModel)
elseif plr.TeamColor == BrickColor.new("Storm blue") then
	GiveParts(DiverModel)
end
end
plr.Changed:connect(OnChanged)
------------------------------

Thanks

2 comments

0

LocalScript or Script?

0

local