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: GUI Not the same for everyone? ;c

Previous Thread :: Next Thread 
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
18 Dec 2014 06:26 PM
So I got this Power and Time GUI for my game, but the only problem is, it's like I join the server, a few minutes later it drops down to 95% then someone else joins, then I ask them how much power is left. They say 99% but mine is 95%. That means that we all have to join at the same time for the power to be the same. Do you guys know something to make the GUI same for everyone regardless of what time they join?
Report Abuse
Ocellus is not online. Ocellus
Joined: 11 Sep 2012
Total Posts: 1043
18 Dec 2014 06:40 PM
You need to use a regular script in the server.

Leave the gui in StarterGui and disable the localscript which does this. In a server script, create a for loop which cycles through every player:

for i,v in pairs(game.Players:GetPlayers()) do
v.PlayerGui.ScreenGui.Frame.TextLabel.Text = "asdf" --example of changing the gui
end
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
18 Dec 2014 07:38 PM
Uhm, I don't know what you're talking about. I'm only a basic scripter, so sorry if i'm annoying ;c
But here's my script in my PowerGUI.
while true do
game.StarterGui.ResetPlayerGuiOnSpawn = false
script.Parent.Text = "100%"
wait(5)
script.Parent.Text = "99%"
wait(5)
script.Parent.Text = "98%"
wait(5)
script.Parent.Text = "97%"
wait(5)
script.Parent.Text = "96%"
wait(5)
script.Parent.Text = "95%"
wait(5)
script.Parent.Text = "94%"
wait(5)
script.Parent.Text = "93%"
wait(5)
script.Parent.Text = "92%"
wait(5)
script.Parent.Text = "91%"
wait(5)
script.Parent.Text = "90%"
wait(5)
script.Parent.Text = "89%"
wait(5)
script.Parent.Text = "88%"
wait(5)
script.Parent.Text = "87%"
wait(5)
script.Parent.Text = "86%"
wait(5)
script.Parent.Text = "85%"
wait(5)
script.Parent.Text = "84%"
wait(5)
script.Parent.Text = "83%"
wait(5)
script.Parent.Text = "82%"
wait(5)
script.Parent.Text = "81%"
wait(5)
script.Parent.Text = "80%"
wait(5)
script.Parent.Text = "79%"
wait(5)
script.Parent.Text = "78%"
wait(5)
script.Parent.Text = "77%"
wait(5)
script.Parent.Text = "76%"
wait(5)
script.Parent.Text = "75%"
wait(5)
script.Parent.Text = "74%"
wait(5)
script.Parent.Text = "73%"
wait(5)
script.Parent.Text = "72%"
wait(5)
script.Parent.Text = "71%"
wait(5)
script.Parent.Text = "70%"
wait(5)
script.Parent.Text = "69%"
wait(5)
script.Parent.Text = "68%"
wait(5)
script.Parent.Text = "67%"
wait(5)
script.Parent.Text = "66%"
wait(5)
script.Parent.Text = "65%"
wait(5)
script.Parent.Text = "64%"
wait(5)
script.Parent.Text = "63%"
wait(5)
script.Parent.Text = "62%"
wait(5)
script.Parent.Text = "61%"
wait(5)
script.Parent.Text = "60%"
wait(5)
script.Parent.Text = "59%"
wait(5)
script.Parent.Text = "58%"
wait(5)
script.Parent.Text = "57%"
wait(5)
script.Parent.Text = "56%"
wait(5)
script.Parent.Text = "55%"
wait(5)
script.Parent.Text = "54%"
wait(5)
script.Parent.Text = "53%"
wait(5)
script.Parent.Text = "52%"
wait(5)
script.Parent.Text = "51%"
wait(5)
script.Parent.Text = "50%"
wait(5)
script.Parent.Text = "49%"
wait(5)
script.Parent.Text = "48%"
wait(5)
script.Parent.Text = "47%"
wait(5)
script.Parent.Text = "46%"
wait(5)
script.Parent.Text = "45%"
wait(5)
script.Parent.Text = "44%"
wait(5)
script.Parent.Text = "43%"
wait(5)
script.Parent.Text = "42%"
wait(5)
script.Parent.Text = "41%"
wait(5)
script.Parent.Text = "40%"
wait(5)
script.Parent.Text = "39%"
wait(5)
script.Parent.Text = "38%"
wait(5)
script.Parent.Text = "37%"
wait(5)
script.Parent.Text = "36%"
wait(5)
script.Parent.Text = "35%"
wait(5)
script.Parent.Text = "34%"
wait(5)
script.Parent.Text = "33%"
wait(5)
script.Parent.Text = "32%"
wait(5)
script.Parent.Text = "31%"
wait(5)
script.Parent.Text = "30%"
wait(5)
script.Parent.Text = "29%"
wait(5)
script.Parent.Text = "28%"
wait(5)
script.Parent.Text = "27%"
wait(5)
script.Parent.Text = "26%"
wait(5)
script.Parent.Text = "25%"
wait(5)
script.Parent.Text = "24%"
wait(5)
script.Parent.Text = "23%"
wait(5)
script.Parent.Text = "22%"
wait(5)
script.Parent.Text = "21%"
wait(5)
script.Parent.Text = "20%"
wait(5)
script.Parent.Text = "10%"
wait(5)
script.Parent.Text = "9%"
wait(5)
script.Parent.Text = "8%"
wait(5)
script.Parent.Text = "7%"
wait(5)
script.Parent.Text = "6%"
wait(5)
script.Parent.Text = "5%"
wait(5)
script.Parent.Text = "4%"
wait(5)
script.Parent.Text = "3%"
wait(5)
script.Parent.Text = "2%"
wait(5)
script.Parent.Text = "1%"
wait(5)
script.Parent.Text = "0%"
game.Lighting.FogEnd = 20
game.Workspace.Door1.DoorButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door1.LightButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door2.DoorButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door2.LightButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door1.Door.Transparency = 1
game.Workspace.Door1.Door.Decal.Transparency = 1
game.Workspace.Door1.Door.Decal2.Transparency = 1
game.Workspace.Door1.Door.CanCollide = false
game.Workspace.Door1.DoorButton.BrickColor = BrickColor.new("Really red")
game.Workspace.Door1.DoorButton.red.Transparency = 0
game.Workspace.Door1.DoorButton.green.Transparency = 1
game.Workspace.Door2.Door.Transparency = 1
game.Workspace.Door2.Door.Decal.Transparency = 1
game.Workspace.Door2.Door.Decal2.Transparency = 1
game.Workspace.Door2.DoorButton.BrickColor = BrickColor.new("Really red")
game.Workspace.Door2.DoorButton.red.Transparency = 0
game.Workspace.Door2.DoorButton.green.Transparency = 1
game.Workspace.Door2.Door.CanCollide = false
game.Workspace.Door1.Light.Sound.Volume = 0
game.Workspace.Door1.Light.PointLight.Brightness = 0
game.Workspace.Door2.Light.Sound.Volume = 0
game.Workspace.Door2.Light.PointLight.Brightness = 0
game.Workspace.Door1.Door.Transparency = 1
game.Workspace.Door1.Door.Decal.Transparency = 1
game.Workspace.Door1.Door.Decal2.Transparency = 1
game.Workspace.Door1.Door.CanCollide = false
game.Workspace.Door1.LightButton.BrickColor = BrickColor.new("Dark stone grey")
game.Workspace.Door1.LightButton.gray.Transparency = 0
game.Workspace.Door1.LightButton.white.Transparency = 1
game.Workspace.Door2.Door.Transparency = 1
game.Workspace.Door2.Door.Decal.Transparency = 1
game.Workspace.Door2.Door.Decal2.Transparency = 1
game.Workspace.Door2.LightButton.BrickColor = BrickColor.new("Dark stone grey")
game.Workspace.Door2.LightButton.gray.Transparency = 0
game.Workspace.Door2.LightButton.white.Transparency = 1
game.Workspace.Light1.PointLight.Brightness = 0
game.Workspace.Light2.PointLight.Brightness = 0
game.Workspace.Light3.PointLight.Brightness = 0
game.Workspace.Light4.PointLight.Brightness = 0
game.Workspace.Brick1.PointLight.Enabled = false
game.Workspace.Brick2.PointLight.Enabled = false
game.Workspace.Brick3.PointLight.Enabled = false
game.Workspace.Brick4.PointLight.Enabled = false
game.Workspace.Blue1.PointLight.Enabled = true
game.Workspace.Blue2.PointLight.Enabled = true
game.Workspace.Blue3.PointLight.Enabled = true
game.Workspace.Blue4.PointLight.Enabled = true
game.Workspace.Lightbulb.Sound.Volume = 0
local s = Instance.new("Sound")
s.Parent = game.Workspace
s.SoundId = "http://www.roblox.com/asset/?id=180711831"
s.Pitch = 1
s:play()
wait(4)
game.Workspace.FreddyFlash.PointLight.Script.Disabled = false
game.Workspace.FreddyFlash.Decal.Script.Disabled = false
wait(20)
game.Lighting.FogEnd = 0
game.Workspace.FreddyFlash.PointLight.Script.Disabled = true
game.Workspace.FreddyFlash.Decal.Script.Disabled = true
wait(8)
game.Lighting.FogEnd = 60
game.Workspace.Door1.DoorButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door1.LightButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door2.DoorButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door2.LightButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Brick1.PointLight.Enabled = true
game.Workspace.Brick2.PointLight.Enabled = true
game.Workspace.Brick3.PointLight.Enabled = true
game.Workspace.Brick4.PointLight.Enabled = true
game.Workspace.Blue1.PointLight.Enabled = false
game.Workspace.Blue2.PointLight.Enabled = false
game.Workspace.Blue3.PointLight.Enabled = false
game.Workspace.Blue4.PointLight.Enabled = false
game.Workspace.Door1.Door.Transparency = 0
game.Workspace.Door1.Door.CanCollide = true
game.Workspace.Door1.Door.Decal.Transparency = 0
game.Workspace.Door1.Door.Decal2.Transparency = 0
game.Workspace.Door2.Door.Transparency = 0
game.Workspace.Door2.Door.CanCollide = true
game.Workspace.Door2.Door.Decal.Transparency = 0
game.Workspace.Door2.Door.Decal2.Transparency = 0
game.Workspace.Light1.PointLight.Brightness = 60
game.Workspace.Light2.PointLight.Brightness = 60
game.Workspace.Light3.PointLight.Brightness = 60
game.Workspace.Light4.PointLight.Brightness = 60
game.Workspace.Lightbulb.Sound.Volume = 0.1
end
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
18 Dec 2014 08:33 PM
bump
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
18 Dec 2014 08:36 PM
1
Report Abuse
Gabestone3000 is not online. Gabestone3000
Joined: 15 Sep 2012
Total Posts: 738
18 Dec 2014 08:44 PM
Five nights at freddys confirmed
Report Abuse
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
18 Dec 2014 08:55 PM
the unefficiency of that script, is off the charts!!!
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:27 PM
@2 above
Shut up. You're no help at all. SOMEONE JUST POST SOMETHING THAT HELPS FOR ONCE
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:27 PM
(what i mean by @2 above was the 2 posts above me)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2014 05:28 PM
Make it go off an intvalue in the workspace, so it's global to everyone.
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:31 PM
Um, again, how do I do that?
I'm only a basic scripter...
The reason you didn't see my last post saying what I just said makes me think you don't read everything ;-; (no offense)
Report Abuse
Scriptulus is not online. Scriptulus
Joined: 05 Jul 2013
Total Posts: 912
19 Dec 2014 05:31 PM
use a for loop instead of repeating wait() 100 times,

for i = 1,100 do
print(tostring(100-i).."%")
wait(5)
end

here should work
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:33 PM
k lemme try c;
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
19 Dec 2014 05:33 PM
omg


for i = 1,100,-1 do
print(i.."%")
wait(5)
end
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2014 05:34 PM
I made the first part more efficient then got lazy lol.


while true do
game.StarterGui.ResetPlayerGuiOnSpawn = false
local percent = 100
for i = 100,0,-1 do
local num = math.random(1,3)
if num == 1 then
percent = percent - 2
elseif num == 2 then
percent = percent - 3
else
percent = percent - 1
end
script.Parent.Text = tostring(percent).."%"
wait(5)
end
game.Lighting.FogEnd = 20
game.Workspace.Door1.DoorButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door1.LightButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door2.DoorButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door2.LightButton.ClickDetector.MaxActivationDistance = 0
game.Workspace.Door1.Door.Transparency = 1
game.Workspace.Door1.Door.Decal.Transparency = 1
game.Workspace.Door1.Door.Decal2.Transparency = 1
game.Workspace.Door1.Door.CanCollide = false
game.Workspace.Door1.DoorButton.BrickColor = BrickColor.new("Really red")
game.Workspace.Door1.DoorButton.red.Transparency = 0
game.Workspace.Door1.DoorButton.green.Transparency = 1
game.Workspace.Door2.Door.Transparency = 1
game.Workspace.Door2.Door.Decal.Transparency = 1
game.Workspace.Door2.Door.Decal2.Transparency = 1
game.Workspace.Door2.DoorButton.BrickColor = BrickColor.new("Really red")
game.Workspace.Door2.DoorButton.red.Transparency = 0
game.Workspace.Door2.DoorButton.green.Transparency = 1
game.Workspace.Door2.Door.CanCollide = false
game.Workspace.Door1.Light.Sound.Volume = 0
game.Workspace.Door1.Light.PointLight.Brightness = 0
game.Workspace.Door2.Light.Sound.Volume = 0
game.Workspace.Door2.Light.PointLight.Brightness = 0
game.Workspace.Door1.Door.Transparency = 1
game.Workspace.Door1.Door.Decal.Transparency = 1
game.Workspace.Door1.Door.Decal2.Transparency = 1
game.Workspace.Door1.Door.CanCollide = false
game.Workspace.Door1.LightButton.BrickColor = BrickColor.new("Dark stone grey")
game.Workspace.Door1.LightButton.gray.Transparency = 0
game.Workspace.Door1.LightButton.white.Transparency = 1
game.Workspace.Door2.Door.Transparency = 1
game.Workspace.Door2.Door.Decal.Transparency = 1
game.Workspace.Door2.Door.Decal2.Transparency = 1
game.Workspace.Door2.LightButton.BrickColor = BrickColor.new("Dark stone grey")
game.Workspace.Door2.LightButton.gray.Transparency = 0
game.Workspace.Door2.LightButton.white.Transparency = 1
game.Workspace.Light1.PointLight.Brightness = 0
game.Workspace.Light2.PointLight.Brightness = 0
game.Workspace.Light3.PointLight.Brightness = 0
game.Workspace.Light4.PointLight.Brightness = 0
game.Workspace.Brick1.PointLight.Enabled = false
game.Workspace.Brick2.PointLight.Enabled = false
game.Workspace.Brick3.PointLight.Enabled = false
game.Workspace.Brick4.PointLight.Enabled = false
game.Workspace.Blue1.PointLight.Enabled = true
game.Workspace.Blue2.PointLight.Enabled = true
game.Workspace.Blue3.PointLight.Enabled = true
game.Workspace.Blue4.PointLight.Enabled = true
game.Workspace.Lightbulb.Sound.Volume = 0
local s = Instance.new("Sound")
s.Parent = game.Workspace
s.SoundId = "http://www.roblox.com/asset/?id=180711831"
s.Pitch = 1
s:play()
wait(4)
game.Workspace.FreddyFlash.PointLight.Script.Disabled = false
game.Workspace.FreddyFlash.Decal.Script.Disabled = false
wait(20)
game.Lighting.FogEnd = 0
game.Workspace.FreddyFlash.PointLight.Script.Disabled = true
game.Workspace.FreddyFlash.Decal.Script.Disabled = true
wait(8)
game.Lighting.FogEnd = 60
game.Workspace.Door1.DoorButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door1.LightButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door2.DoorButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Door2.LightButton.ClickDetector.MaxActivationDistance = 10
game.Workspace.Brick1.PointLight.Enabled = true
game.Workspace.Brick2.PointLight.Enabled = true
game.Workspace.Brick3.PointLight.Enabled = true
game.Workspace.Brick4.PointLight.Enabled = true
game.Workspace.Blue1.PointLight.Enabled = false
game.Workspace.Blue2.PointLight.Enabled = false
game.Workspace.Blue3.PointLight.Enabled = false
game.Workspace.Blue4.PointLight.Enabled = false
game.Workspace.Door1.Door.Transparency = 0
game.Workspace.Door1.Door.CanCollide = true
game.Workspace.Door1.Door.Decal.Transparency = 0
game.Workspace.Door1.Door.Decal2.Transparency = 0
game.Workspace.Door2.Door.Transparency = 0
game.Workspace.Door2.Door.CanCollide = true
game.Workspace.Door2.Door.Decal.Transparency = 0
game.Workspace.Door2.Door.Decal2.Transparency = 0
game.Workspace.Light1.PointLight.Brightness = 60
game.Workspace.Light2.PointLight.Brightness = 60
game.Workspace.Light3.PointLight.Brightness = 60
game.Workspace.Light4.PointLight.Brightness = 60
game.Workspace.Lightbulb.Sound.Volume = 0.1
end
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
19 Dec 2014 05:37 PM
>implies fnaf games are supposed to be multiplayer
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:37 PM
ohhh thats why it wasnt working lemme try now C:
if dis doesn't work imma cry liek a noob (hence my look)
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:37 PM
^^
u maik me sad imma make a singleplayer version
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2014 05:38 PM
I didn't fix anything except for efficiency of your script. And I made it more like a read batter(batteries don't decay at a constant rate, it's somewhat randomized)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2014 05:39 PM
real battery*
Report Abuse
penapox is not online. penapox
Joined: 05 Jul 2014
Total Posts: 1597
19 Dec 2014 05:50 PM
i thought the time it takes to lose power is randomized but its how much power you lose thats randomized
i want that the power always goes down by 1% but the time it takes to do down is randomized (max 10 secs)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
19 Dec 2014 05:53 PM
Can I see your game? Like uncopylock it so I can make this all more efficient. It's killing me
Report Abuse
DispenseTheDispenser is not online. DispenseTheDispenser
Joined: 20 Jun 2013
Total Posts: 2268
19 Dec 2014 06:31 PM
that inefficient countdown tho


a = 100
for i = 1, 100 do
script.Parent.Text = a.."% Battery"
a = a - 1
wait(5)
end

the countdown can be compressed into that ^^
Report Abuse
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
19 Dec 2014 06:37 PM
@Dispense
I can make that even more efficient


a = 100
for i = 1, 100 do
script.Parent.Text = a.."% Battery"
a = a - 1
wait(5)
end

for i = 100, 1, -1 do
script.Parent.Text = "".. i .."% Battery"
wait(5)
end
Report Abuse
DispenseTheDispenser is not online. DispenseTheDispenser
Joined: 20 Jun 2013
Total Posts: 2268
19 Dec 2014 06:38 PM
thx

the more i know
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