my script is a local script inside a text box, i enter my name into the textbox, and it kills me, but the team spawns break and i dont spawn at the cage spawn, and yes, i do have all of the spawns set to the right colors.
code here:
local TextBox = script.Parent
TextBox.FocusLost:Connect(function()
if game.Players[TextBox.Text] then
local player = game.Players[TextBox.Text]
local character = player.Character or player.CharacterAdded
print(TextBox.Text.." Player found")
TextBox.Parent.Players.MouseButton1Click:Connect(function()
character:FindFirstChild("Humanoid").Health = 0
end)
TextBox.Parent.Cage.MouseButton1Click:Connect(function()
character:FindFirstChild("Humanoid").Health = 0
end)
else
print(TextBox.Text.." Player not found")
end
end)
