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: Change Script Format. Help?

Previous Thread :: Next Thread 
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
02 Mar 2014 03:17 PM
This is a minigame script with messages in it... could someone please convert it for me, or post a new one that gives gui messages instead of regular messages? Thanks for the help!

What I want is for where it says: msg. to change those lines so that it works through a gui instead of through a message. Help would be much appreciated.

while true do --This makes sure it keeps going and doesn't die out on us
wait(5) --This is how long until the games are started. Recomended that you keep to 5
local m = math.random(1,5) --This randomly selects a game. The seven shows how many games there are
local player = game.Players:GetPlayers()
for i = 1, #player do --This checks for players and gets them
msg = Instance.new("Message") --This make the annoying messages that appear on you screen
msg.Parent = nil --This identifies the game
if m == 1 then --don't change unless you know what you are doing
msg.Parent = game.Workspace --This makes sure it says and appears in the workspace
msg.Text = "Choosing Map." --A bunch of messages to tell you that the game is starting which you can change if desired
wait(1)
msg.Text = "Choosing Map.."
wait(1)
msg.Text = "Choosing Map..."
wait(1)
msg.Text = "A Map has been chosen!"
wait(3)
msg.Text = "The Map is..."
wait(3)
msg.Text = "Raft" --Put the name of the minigame you want it to be called
wait(2)
msg.Text = "Survive the Round!" --Put the rules of the minigame
wait(5)
msg.Text = "The game will be starting in:"
wait(1)
msg.Text = "...3..."
wait(1)
msg.Text = "..2.."
wait(1)
msg.Text = ".1."
wait(1)
msg.Text = "Begin!"
wait(1)
player[i].Character:MoveTo(Vector3.new(416, 110.4, -162)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
msg:remove() --This removes the annoying messages Don't mess with!
game.Lighting.Field1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish.
wait(120) --How long the game lasts
msg.Parent = game.Workspace
msg.Text = "Winner(s)!" --After the game ends, this shows a message/messages at the end. Edit if you want.
wait(3)
msg:remove()
game.Workspace.Field1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored)
end
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Mar 2014 03:51 PM
Make a GUI called message in lighting, visual;

lighting
>message
>>Frame
>>>Text


MAKE SURE THE GUI IS CORRECTLY MADE, keep the Text property of TextLabel empty.

then do this;

--First line;

Players = game.Players:GetPlayers()

--put this in Everytime it says msg.Text to this;

for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()

--Hope I helped
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
02 Mar 2014 03:55 PM
Wait, so I don't have to change all the individual message lines? Just the beginning of the script? This does help, thanks!
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
02 Mar 2014 03:57 PM
Also, which lines would this be replacing in the script? Could you possibly put these lines into the script I posted and repost it for me? Thanks!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Mar 2014 04:48 PM
There very first line is what I said it was, replace msg.Text with the other lines I showed you, I would post a new script, but I am on iPod posting! Hope I helped
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Mar 2014 04:49 PM
OPPS, my visual was wrong;

Lighting
>ScreenGui
>>Frame
>>>TextLabel
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Mar 2014 04:50 PM
I keep making mistakes... Lemme open with computer...
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
02 Mar 2014 05:11 PM
REVISED POST, HOPEFULLY NO ERRORS:







GUI VISUAL:
lighting
>message
>>Frame
>>>TextLabel


Players = game.Players:GetPlayers()
while true do --This makes sure it keeps going and doesn't die out on us
wait(5) --This is how long until the games are started. Recomended that you keep to 5
local m = math.random(1,5) --This randomly selects a game. The seven shows how many games there are
local player = game.Players:GetPlayers()
for i = 1, #player do --This checks for players and gets them
msg = game.Lighting.message --This make the annoying messages that appear on you screen
msg.Parent = nil --This identifies the game
if m == 1 then --don't change unless you know what you are doing
msg.Parent = game.Workspace --This makes sure it says and appears in the workspace
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
mfor I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
player[i].Character:MoveTo(Vector3.new(416, 110.4, -162)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
game.Lighting.Field1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish.
wait(120) --How long the game lasts
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
game.Workspace.Field1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored)
end


--REPLACE EACH "WHAT IT SAYS" WITH WHAT THE MESSAGE IS, IN ORDER OF THE ORGINAL SCRIPT
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 12:42 AM
Thankyou so much. You have been a great help!
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 12:56 AM
When I put the script into studio it says there is an error in this line (It is the 12th line down in the script):

msg = message:Clone().Parent = Players[I].PlayerGui
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
03 Mar 2014 04:32 AM
OPPS... Change line

msg = game.Lighting.message

To

message = game.Lighting.messag


Sorry about that...
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 05:00 PM
It is still giving me the same error even when I change that for some reason. :O
Report Abuse
Vexedly is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
03 Mar 2014 05:01 PM
[ Content Deleted ]
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 05:34 PM
Ok. Thank you.
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
03 Mar 2014 05:35 PM
AHHHHH

Use loops for a minigame!
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
03 Mar 2014 05:37 PM
How to pick random maps and display messages easily! Use functions and tables!

local maps = {
game.Lighting.Map1:clone()
game.Lighting.Map2:clone()
}

function display(msg, length)
local m = Instance.new("Message", Workspace)
wait(length)
m:Destroy()
end

function randomMap()
local map = maps[math.random(1, #maps)]:clone()
map.Parent = Workspace
wait(ROUND TIME)
map:Destroy()
end

while wait() do
display("Time for a new round!", 3)
randomMap()
end
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 05:43 PM
@ Forever ~ I wanted the message to be displayed in a gui though :O
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
03 Mar 2014 06:27 PM
REVISED POST, HOPEFULLY NO ERRORS:







GUI VISUAL:
lighting
>message
>>Frame
>>>TextLabel


Players = game.Players:GetPlayers()
while true do --This makes sure it keeps going and doesn't die out on us
wait(5) --This is how long until the games are started. Recomended that you keep to 5
local m = math.random(1,5) --This randomly selects a game. The seven shows how many games there are
local player = game.Players:GetPlayers()
for i = 1, #player do --This checks for players and gets them
message = game.Lighting.message --This make the annoying messages that appear on you screen
msg.Parent = nil --This identifies the game
if m == 1 then --don't change unless you know what you are doing
msg.Parent = game.Workspace --This makes sure it says and appears in the workspace
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
mfor I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
player[i].Character:MoveTo(Vector3.new(416, 110.4, -162)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
game.Lighting.Field1:clone().Parent = game.Workspace -- Make a minigame then name it just like this: Minigame1 Once it is named that, put it in the position on the map were you want it to go then put the model in lighting. After you put the model in lighting, you may delete the one in workspace if you wish.
wait(120) --How long the game lasts
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
game.Workspace.Field1:Remove() --Removes the brick so all players die (except spectators) and removes the brick so a new game can start (recommended games aren't over 5 minutes so spectators aren't bored)
end


--REPLACE EACH "WHAT IT SAYS" WITH WHAT THE MESSAGE IS, IN ORDER OF THE ORGINAL SCRIPT
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 08:39 PM
It still says there is a script error. Do you think you could put it into your studio and look at the script error yourself? It might be easier for you to fix that way. Thank you for the help, it is much appreciated. :)
Report Abuse
TexasTech717 is not online. TexasTech717
Joined: 24 Apr 2012
Total Posts: 1129
03 Mar 2014 08:40 PM
I can't bookmark this, but I want to see what happens.
Report Abuse
Fjfod is not online. Fjfod
Joined: 05 Aug 2013
Total Posts: 81
03 Mar 2014 08:43 PM
How would you change this so that it makes it a GUI?:

h = Instance.new("Hint")
h.Parent = game.Workspace
h.Text = ""

The rest of the script uses "h," so all I need to change is this stuff, but I don't know how. Thanks!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
03 Mar 2014 08:45 PM
drco, after all those for whatever do's and then msg:Destroy() put an end.
Anyway I gotta get some sleep
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 08:57 PM
I did it but the script error is still showing up (I labeled where the script error is occurring):

Players = game.Players:GetPlayers()
while true do
wait(5)
local m = math.random(1,1)
local player = game.Players:GetPlayers()
for i = 1, #player do
message = game.Lighting.message
msg.Parent = nil
if m == 1 then
msg.Parent = game.Workspace
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui --This where it occurs!!!!!!!
msg.Frame.TextLabel.Text = "Choosing Map."
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "Choosing Map.."
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "Choosing Map..."
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "A Map has been chosen!"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "The Map is..."
wait(TIME)
msg:Destroy()
end
mfor I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "Raft"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "Do your best to survive"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "The game will be starting in:"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "3"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "2"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "1"
wait(TIME)
msg:Destroy()
end
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "FIGHT!"
wait(TIME)
msg:Destroy()
end
player[i].Character:MoveTo(Vector3.new(416, 110.4, -162)) --Replace 206, 31.4, 48.5 with the location of where you want all players to be teleported to at the start of the minigame
game.Lighting.Field1:clone().Parent = game.Workspace
wait(120) --How long the game lasts
for I = 1, #Players do
msg = message:Clone().Parent = Players[I].PlayerGui
msg.Frame.TextLabel.Text = "WHAT IT SAYS"
wait(TIME)
msg:Destroy()
end
game.Workspace.Field1:Remove()
end
end
end
Report Abuse
Vexedly is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
03 Mar 2014 09:33 PM
[ Content Deleted ]
Report Abuse
drco12 is not online. drco12
Joined: 26 Sep 2009
Total Posts: 234
03 Mar 2014 10:15 PM
@ vex Did you say you would post a script for me perhaps? :)
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