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 problem (only appearing to one player)

Previous Thread :: Next Thread 
gobitoe is not online. gobitoe
Joined: 30 Jan 2011
Total Posts: 1781
01 Aug 2015 09:16 PM
The WHOLE script works, but when I click the part, the gui only appears into the LocalPlayer's screen, and not everyone like it's supposed to.

The script is;
-a server script
-in the serverscriptservice

It's supposed to appear to everyone, but it's not




local gui = script.Voting

function run()
local list = game.Players:GetChildren()
wait(.1)

for i=1,#list do
local playergui = gui:clone()
playergui.Parent = list[i].PlayerGui
playergui.Name = "Voting"

wait(10)

local vote1 = game.ReplicatedStorage.map1.Value
local vote2 = game.ReplicatedStorage.map2.Value
local vote3 = game.ReplicatedStorage.map3.Value
local frm = list[i].PlayerGui.Voting.Main.Choice

local map = (math.max(vote1, vote2, vote3))
print(map)

if map == 0 then
wait(.1)
list.PlayerGui.Voting:remove()
run()
else

if map == vote1 then
print("Map1")
frm.Text = "Map 1"
tween()
wait(5)
--local M_1 = game.ServerStorage.MAPNAME1:Clone()
--M_1.Parent = game.Workspace
else if
map == vote2 then
print("Map2")
frm.Text = "Map 2"
tween()
wait(5)
--local M_2 = game.ServerStorage.MAPNAME2:Clone()
--M_2.Parent = game.Workspace
else if
map == vote3 then
print("Map3")
frm.Text = "Map 3"
tween()
wait(5)
--local M_3 = game.ServerStorage.MAPNAME3:Clone()
--M_3.Parent = game.Workspace
end
end
end
end
wait(.1)
for i=1,#list do
list[i].PlayerGui.Voting:remove()
end
end
end

function tween()
local list = game.Players:GetChildren()
wait(.1)
for i=1,#list do
local frm = list[i].PlayerGui.Voting.Main.Choice
frm.Visible = true
frm:TweenSizeAndPosition(UDim2.new(0, 200, 0, 50),UDim2.new(-0.5,100,0,200),"Out", "Quad", 1)
end
end
game.Workspace.Part.ClickDetector.MouseClick:connect(run)
Report Abuse
gobitoe is not online. gobitoe
Joined: 30 Jan 2011
Total Posts: 1781
02 Aug 2015 12:48 AM
bump
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
02 Aug 2015 12:50 AM
First off,
Don't use for I=1,#list do

Use

for I,v in pairs(game.Players:GetPlayers()) do
local Gooey = gui:Clone()
Gooey.Parent v.PlayerGui
Gooey.Name = "Voting"
end

I assume gui was already defined earlier in the script?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
02 Aug 2015 01:01 AM
Go to the bottom of the script. Put your cursor on the bottom-right side of the page, inside the script. Press the left mouse button, and hold it. Move the mouse up and toward the left until all of the text in the script is highlighted, then press backspace.

Or:

Right-click on the script, then left click on "Delete".
Report Abuse
Barbariancreep is not online. Barbariancreep
Joined: 23 Nov 2012
Total Posts: 1096
02 Aug 2015 01:08 AM
^
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
02 Aug 2015 01:08 AM
My eyes could barely handle the first 10 or so lines, then they burned.

I'm typin blond hwrw si if there is erors than tat y
Report Abuse
gobitoe is not online. gobitoe
Joined: 30 Jan 2011
Total Posts: 1781
02 Aug 2015 02:33 PM
Thanks for the help, and I'm being sarcastic.
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