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
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 1781 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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
|
  |
| Joined: 30 Jan 2011 |
| Total Posts: 1781 |
|
|
| 02 Aug 2015 02:33 PM |
| Thanks for the help, and I'm being sarcastic. |
|
|
| Report Abuse |
|
|