Roblox Scripting Tutorial: Changing Teams Part 2
New GUI Script:
player = script.Parent.Parent.Parent.Parent
function onClicked()
player.TeamColor = BrickColor.new("Bright red")
character = game.Workspace:FindFirstChild(player.Name)
character:MoveTo(game.Workspace.SpawnLocationRed.Position)
script.Parent.Parent:remove()
end
script.Parent.MouseButton1Down:connect(onClicked)
GUI Giver Script:
gui = script.ScreenGui:clone()
function onPlayerAdded(player)
newgui = gui:clone()
newgui.Parent = player.PlayerGui
end
game.Players.ChildAdded:connect(onPlayerAdded)
Be sure to follow Laura and I on Twitter after rating, commenting, and subscribing!
Me :https://twitter.com/Rrrrry123
Laura: https://twitter.com/lauraperry123
Also, follow me on Twitch for some live streams!
http://www.twitch.tv/Rrrrry123