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: Intermission Script ~ How to make it appear not for only you

Previous Thread :: Next Thread 
8BitDeveloping is not online. 8BitDeveloping
Joined: 09 Aug 2011
Total Posts: 1472
12 Jul 2015 11:56 PM
I have a script inside the GUI i'm working with; it's not a localscript. But the problem is, it still shows up for only that player. How do I make it so say you join, it starts counting down. Now it's at 19. Another player joins, and it's now at 19 instead of restarting from 30. Here's the script:

local tvalue = script.Parent
local pvalue = script.Parent.Parent
local maps = {"Map1", "Map2"}
local gamemodes = {"Regular", "CTF", "King of the Hill"}
local mapvalue = game.Lighting.Map
local gamemodevalue = game.Lighting.Gamemode
state = script.Parent.Parent.State
beep = script.Parent.Parent.Beep
local id = "244937380"
beep.SoundId = "http://www.roblox.com/asset/?id=" .. id

function choosemap()
resultmap = maps[math.random(1, #maps)]
mapvalue.Value = resultmap
end

function choosegamemode()
resultmode = gamemodes[math.random(1, #gamemodes)]
gamemodevalue.Value = resultmode
desc = ""
if resultmode == "Regular" then
desc = "A regular round. Kill the enemy."
elseif resultmode == "CTF" then
desc = "Capture the enemy flag."
elseif resultmode == "King of the Hill" then
desc = "Stay on the hill as king to earn points."
end
end

function lobby()
state.Value = "SlideIn"
for i = 30, 0, -1 do
wait(1)
print(i)
tvalue.Text = i
beep:Play()
if i == 1 then
id = "244937312"
beep.SoundId = "http://www.roblox.com/asset/?id=" .. id
beep:Play()
wait(1)
end
if i == 0 then
tvalue.Text = ""
pvalue.Text = "Choosing map.."
wait(3)
choosemap()
pvalue.Text = "Chosen map: " .. resultmap
wait(3)
pvalue.Text = "Choosing gamemode.."
wait(3)
choosegamemode()
pvalue.Text = "Gamemode chosen: " .. resultmode
tvalue.Text = desc
wait(3)
pvalue.Text = "Let's get shootin'!"
state.Value = "SlideOut"
tvalue.Text = ""
end
end
end

if game.Players.NumPlayers > 1 then
lobby()
else
--pvalue.Text = "Need one more player to begin."
--tvalue.Text = "Because we're that mean."
lobby()
end


"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary!
Report Abuse
Vyxium is not online. Vyxium
Joined: 31 Aug 2010
Total Posts: 1020
13 Jul 2015 01:24 AM
1st of all, dont use free models, 2nd, no one is going to read all that, 3rd, anything inside the player is local (including playerguis, starterguis, etc)
Report Abuse
8BitDeveloping is not online. 8BitDeveloping
Joined: 09 Aug 2011
Total Posts: 1472
13 Jul 2015 02:09 AM
Free models? No. Lol. You underestimate me.. -_-


"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary!
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
13 Jul 2015 04:16 AM
You iterate through all the players guis and update them. Also, if you are trying to do this in a local script, stop. Use a serverscript.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
8BitDeveloping is not online. 8BitDeveloping
Joined: 09 Aug 2011
Total Posts: 1472
13 Jul 2015 12:51 PM
I fixed it, thanks.


"YOU SHALL NOT BLOX!" // Scripter // Developer // ~ Join my primary!
Report Abuse
haydebug2003 is not online. haydebug2003
Joined: 21 Jan 2012
Total Posts: 5302
13 Jul 2015 12:54 PM
use a string value then put in
function lol()
game.Workspace.StringValue.Value = script.Parent.Text
end

game.Workspace.StringValue.Changed:connect(lol)


"As a wise man once told me, get out."
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