generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Spectate

Previous Thread :: Next Thread 
darknight189517 is not online. darknight189517
Joined: 27 Dec 2013
Total Posts: 1855
28 Dec 2015 01:49 PM
how do i make a spectate gui
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
28 Dec 2015 01:50 PM
Every time you click the left or right button a value goes up or down.

The player your spectating is game.players[value], then you go from there :).
Report Abuse
darknight189517 is not online. darknight189517
Joined: 27 Dec 2013
Total Posts: 1855
28 Dec 2015 01:52 PM
what you mean
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
28 Dec 2015 01:53 PM
This is how I make my spectate gui: (matchtag is too make sure their in the game round).

leftbutton.MouseButton1Down:connect(function()
tag.Value = tag.Value - 1
if tag.Value <= 0 then
tag.Value = #game.Players:GetChildren()
end
end)
rightbutton.MouseButton1Down:connect(function()
tag.Value = tag.Value + 1
if tag.Value > #game.Players:GetChildren() then
tag.Value = 0
end
end)

function spectate()
local players = game.Players:GetChildren()
if players then
local player = players[tag.Value]
if player then
if player.Character:FindFirstChild("MatchTag") ~= nil then
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
cam.CameraSubject = humanoid
name.Text = player.Name
end
else
return spectate()
end
end
end
end
tag.Changed:connect(spectate)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image