The slipper team tool doesn't work any more


This shows the format. It highlights the stuff which isn’t work.
The team gives the animation tool but the not the slipper.
SCRIPT SHOWN IN PHOTO:

--Just put weapons in the team and put script in serverscriptservice.


function teamFromColor(color) 
	for _,t in pairs(game:GetService("Teams"):GetChildren()) do 
		if t.TeamColor==color then return t end 
	end 
	return nil 
end 

function onSpawned(plr) 
	local tools = teamFromColor(plr.TeamColor):GetChildren() 
		for _,c in pairs(tools) do 
	c:Clone().Parent = plr.Backpack 
	end 
end 

function onChanged(prop,plr) 
	if prop=="Character" then 
		onSpawned(plr) 
	end 
end 

function onAdded(plr) 
	plr.Changed:connect(function(prop) 
		onChanged(prop,plr) 
	end) 
end 

game.Players.PlayerAdded:connect(onAdded)

Also look you get double the tools. I’m not sure what went wrong. I don’t get the slipper now.

Not sure what you exactly mean by any of this, but from the looks of it if the code is working fine then you may want to show us the part where it’s erroring or not working.

  • Have you edited the tool recently?
  • Is the slipper a nil instance? Try using print() and :GetFullName() on it.
  • Is it because the tools are inside of game.Teams? Try putting them into game:GetService('ReplicatedStorage')

Without more context, it’s pretty difficult to find out.

13179059653 - This is the asset id. Please help me. I wasted 1 hour trying to fix this.

the item here doesnt have all of the scripts, can you send everything?

That’s all there is. It’s in server scripts

there is nothing dealing with the script you posted in the initial post

This is a team tool. The team is a gamepass