game.Players.PlayerAdded:connect(function(nP) -- connect event to anonymous function nP.CharacterAdded:connect(function(nC) -- connect event to anonymous function sg = Instance.new("ScreenGui", nP.PlayerGui) -- create the screengui sg.Name = "Welcome" -- set its name fr = Instance.new("Frame", sg) -- create the frame inside the ScreenGui fr.Size = UDim2.new(0, 150, 0, 30) -- set its size fr.Position = UDim2.new(0, 0, 0.5, -15) -- center the frame fr.Style = "RobloxRound" tb = Instance.new("TextButton", fr) -- create a textbutton, put it in frame tb.Size = UDim2.new(1, 0, 1, 0) tb.Style = "RobloxButtonDefault" tb.TextColor3 = Color3.new(1, 1, 1) tb.Text = "Join Game" tb.MouseButton1Click:connect(function(Player) end) end) end)
after i created the last anonymous function i stuck tthere what would i do to tp the player to the model named de_aztec