Error: LoadChracter is not a valid member of Player
It works, I just get this error, and it makes me have to click it twice to respawn.
local clicker = game.Players.LocalPlayer script.Parent.MouseButton1Down:connect(function() if clicker.TeamColor == BrickColor.new("Bright red") then clicker.TeamColor = BrickColor.new("Bright blue") clicker:LoadChracter() end end)
First problem player.TeamColor takes a BrickColor value not a string
BrickColor.new("Bright blue")
Second problem the parameters of MouseButton1Down are x, y not the player that clicks it.
MouseButton1Down should be used in a local script since so you can get the person who clicked with localplayer
local clicker = game.Players.LocalPlayer
Third problem Humanoid isn't in the player, it's in the character
local clicker = game.Players.LocalPlayer local character = clicker.Character
Fixed code put together
local clicker = game.Players.LocalPlayer local character = clicker.Character script.Parent.MouseButton1Down:connect(function() if clicker.TeamColor == BrickColor.new("Bright blue") then clicker.TeamColor = BrickColor.new("Bright red") clicker.Humanoid.Health = 0 end end)