#how do i fix ts, im tryna make the handle change color to the team color
1 messages · Page 1 of 1 (latest)
is this local or server script
server script in handle
dont use tool.Equipped just use a local function and run it when the player joins
il try
use this ```lua
local handle = script.Parent
local function setHandleColor(player)
handle.Color = player.TeamColor
end
game.Players.PlayerAdded:Connect(setHandleColor)
any errors?
ill see
local handle = script.Parent.Handle
local Players = game:GetService("Players")
local tool = script.Parent
local function setHandleColor(player)
if player and player.TeamColor then
handle.Color = player.TeamColor.Color
else
warn("No player or player has no TeamColor!")
end
end
tool.Equipped:Connect(function()
local character = tool.Parent
local player = Players:GetPlayerFromCharacter(character)
setHandleColor(player)
end)
there
it actually works just make sure its inside the tool not handle
or set the handle at the top to script.Parent
thanks brooo i can finaly play as medih
Assume this will run with every tool