Hello. I have been creating a game (
https://www.roblox.com/games/12634162320) and I am very new to scripting. I have been trying to make a "Deploy" button that changes the team to a random one between two variables, gets rid of the GUI, and kills the player. I have tried almost everything I could think of and this is what it amounted to:
local player = game.StarterPlayer
local menu = game.StarterGui.Menu
local button = game.StarterGui.Menu.Frame.PlayButton
local axisteam = game.Teams.Axis
local alliedteam = game.Teams.Allies
local notingame = game.Teams.NotGame
until menu.Enabled = false
button.MouseButton1Click:Connect:function()
player.health = 0
end
end
Please help.