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 » Scripting Helpers
Home Search
 

Re: Please Help

Previous Thread :: Next Thread 
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 07:48 PM
Okay, I'm trying to make it so it so I don't have to use the "Hint" and "Message" talk they have, I want a GUI. But I don't know were my problem is.


1st

local Player = game.Players:GetPlayers().PlayerGui
local a = Instance.new("ScreenGui")
local b = Instance.new("Frame")
local c = Instance.new("TextLabel")
b.Parent = a
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.Parent = b
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = "Welcome"
a.Parent = Player


2nd

local Player = game.Players.LocalPlayer
local Local = Player.PlayerGui
local a = Instance.new("ScreenGui")
local b = Instance.new("Frame")
local c = Instance.new("TextLabel")
b.Parent = a
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.Parent = b
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = "Welcome"
a.Parent = Local

Thanks so much for reading, and replying!
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 07:52 PM
Wait, you're using both or just one? Why are there two scripts?

First thing I noticed: local Player = game.Players:GetPlayers().PlayerGui --can't do that
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 07:53 PM
If you read, I said 1st one is the one that is not working and second is the one that works in Play Solo mode... and yes I understand that does not work. But what can I do to make it work?
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 07:55 PM

for i,v in pairs(game.Players:GetPlayers()) do
local a = Instance.new("ScreenGui", v)
local b = Instance.new("Frame", a)
local c = Instance.new("TextLabel", b)
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = "Welcome"
end


Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 07:55 PM
--edit

local a = Instance.new("ScreenGui", v.PlayerGui)
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:03 PM
What you added is great! But, I should have added this because it is not working:

while true do
for i,v in pairs(game.Players:GetPlayers()) do
local a = Instance.new("ScreenGui", v.PlayerGui)
local b = Instance.new("Frame", a)
local c = Instance.new("TextLabel", b)
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = "Welcome"
end
c.TextTransparency = 0.9
wait(.01)

Do you think the while true statement is confusing my script?
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:05 PM
.
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:08 PM
Any Idea?
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:10 PM
Please, someone?
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:13 PM
Okay, so I have two parts where it goes for i,v stuff like that here

local m = math.random(1,Games)
local player = game.Players:GetPlayers()
for i = 1, #player do
if m == 1 then

can that ruin the script?
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:16 PM
.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 08:19 PM
While true do is going to keep inserting the GUI over an over forever.
Report Abuse
Shonysky is not online. Shonysky
Joined: 05 Aug 2013
Total Posts: 361
29 Nov 2013 08:19 PM
you need a connection to do that
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:21 PM
I know that. I just don't get why it is working. I see what your saying it's not while true. But here because i thinkg their is a problem sense i have these two connection going on:


local m = math.random(1,Games)
local player = game.Players:GetPlayers()
for i = 1, #player do -- should i change the "i"?
if m == 1 then


while true do
for i,v in pairs(game.Players:GetPlayers()) do
local a = Instance.new("ScreenGui", v.PlayerGui)
local b = Instance.new("Frame", a)
local c = Instance.new("TextLabel", b)
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = ""
end
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:24 PM
@Shonysky, i have a connection. It's just the single part I requested help for.
Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:27 PM
.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
29 Nov 2013 08:30 PM
I don't know what you're trying to do, mini games? Here are some options;


local Games = game.Lighting.Games:GetChildren() --Change, idk your directory.
local m = Games[math.random(1, #Games)]
local player = game.Players:GetPlayers()
local hint = Instance.new("Hint", Workspace)
local mini = 2 --minimum players to start
local gameStarted = false



function chooseMap()
return Games[math.random(1, #Games)]
end

function gui()
for i,v in pairs(game.Players:GetPlayers()) do
local a = Instance.new("ScreenGui", v.PlayerGui)
local b = Instance.new("Frame", a)
local c = Instance.new("TextLabel", b)
b.BackgroundColor3 = Color3.new(0/255,0/255,0/255)
b.Position = UDim2.new(0,0,0,0)
b.Size = UDim2.new(1,0,0.1,0)
b.BackgroundTransparency = 1
c.Font = "ArialBold"
c.FontSize = "Size24"
c.BackgroundTransparency = 1
c.TextTransparency = 1
c.TextColor3 = Color3.new(255/255,255/255,255/255)
c.Size = UDim2.new(1,0,1,0)
c.Text = ""
end
end

function countdown()
for i = 60, 0, -1 do
hint.Text = "Game ending in " ..i
wait(1)
end
end


function startGame()
gui()
local map = chooseMap()
hint.Text = "Map chosen: "..map.Name
countdown()
gameStarted = false
end


while wait() do
if not gameStarted then
if game.Players.NumPlayers >= mini then
gameStarted = true
startGame()
else
hint.Text = "Waiting for ".. mini - game.Players.NumPlayers.. " more player to join."
end
end
end


Report Abuse
Airennor is online. Airennor
Joined: 31 Oct 2012
Total Posts: 1607
29 Nov 2013 08:32 PM
Yes, minigames. My minigames. But my script has 1200 lines but this one uses hints mine don't i have a countdown gui inside the script. But I'll try functions. Or something thanks for the help.
Report Abuse
Shonysky is not online. Shonysky
Joined: 05 Aug 2013
Total Posts: 361
30 Nov 2013 06:22 AM
where is localizated the script? its need to be a script, not a local script, and need to be placed in the workspace
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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