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: What'd I do wrong...

Previous Thread :: Next Thread 
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:21 PM
z = "Loaded"
print(z)

t = "Script still under-construction"
print(t)

local x = Instance.new("Hint", workspace")
x.Text = "Welcome To Jango464's Minigames II!"
wait(5)
x.Text = "This version of jango464's Minigames contains no free models!"
wait(5)
x.Text = "Or is it copied!"
wait(5)
x.Text = "I hope you enjoy this version like the first one even though it was copied!"
wait(5)
x.Text = "Please send me a message about any bugs that you find so I can fix them."
wait(5)
x.Text = "Have Fun!"
wait(5)
x.Text = "Starting Minigames..."

while true do
wait(2)
game.Workspace.Base.Anchored = true
local m = math.random(1,1)
local player = game.Players:GetPlayers()
for i = 1, #player do
end
if m == 1 then
wait(1)
x.Text = "Choosing Minigame..."
wait(5)
x.Text = "Minigame Found!"
wait(2)
x.Text = "The Minigame Name Is..."
wait(2)
x.Text = "Ball Jump!"
wait(2)
x.Text = "Jump on every ball then touch the shiny brick at the end to earn 10 points! Goodluck to everyone!"
wait(10)
x.Text = "The minigame will start in..."
wait(3)
x.Text = "3 seconds..."
wait(1)
x.Text = "2 seconds.."
wait(1)
x.Text = "1 second."
wait(1)
x.Text = "Begin Jumping!"
wait(1)
game.Lighting.Minigame1:clone()
wait(2)
player[i].Character:MoveTo(Vector3.new(-145, 1.6, 302.5))
game.Workspace.Base.Anchored = false
x:remove()
wait(60)
game.Workspace.Minigame1["Points Brick"]:remove()
local c = Instance.new("Hint", workspace")
c.Text = "Minigame Over!"
wait(2)
c.Text = "Congratulations to the winner or winner!"
c:remove()
if player.Character.Humanoid.Health == 100 then
player[i].Character:MoveTo(Vector3.new(0, 0.2, 0))
end
end
end

It won't work...
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:23 PM
I spent over an hour on this and It won't work...
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 12:25 PM
try this


then insert a hint and message into Workspace




z = "Loaded"
print(z)

t = "Script still under-construction"
print(t)

local x = Workspace.Hint
x.Text = "Welcome To Jango464's Minigames II!"
wait(5)
x.Text = "This version of jango464's Minigames contains no free models!"
wait(5)
x.Text = "Or is it copied!"
wait(5)
x.Text = "I hope you enjoy this version like the first one even though it was copied!"
wait(5)
x.Text = "Please send me a message about any bugs that you find so I can fix them."
wait(5)
x.Text = "Have Fun!"
wait(5)
x.Text = "Starting Minigames..."

while true do
wait(2)
game.Workspace.Base.Anchored = true
local m = math.random(1,1)
local player = game.Players:GetPlayers()
for i = 1, #player do
end
if m == 1 then
wait(1)
x.Text = "Choosing Minigame..."
wait(5)
x.Text = "Minigame Found!"
wait(2)
x.Text = "The Minigame Name Is..."
wait(2)
x.Text = "Ball Jump!"
wait(2)
x.Text = "Jump on every ball then touch the shiny brick at the end to earn 10 points! Goodluck to everyone!"
wait(10)
x.Text = "The minigame will start in..."
wait(3)
x.Text = "3 seconds..."
wait(1)
x.Text = "2 seconds.."
wait(1)
x.Text = "1 second."
wait(1)
x.Text = "Begin Jumping!"
wait(1)
game.Lighting.Minigame1:clone()
wait(2)
player[i].Character:MoveTo(Vector3.new(-145, 1.6, 302.5))
game.Workspace.Base.Anchored = false
x:remove()
wait(60)
game.Workspace.Minigame1["Points Brick"]:remove()
local c = Workspace.Hint
c.Text = "Minigame Over!"
wait(2)
c.Text = "Congratulations to the winner or winner!"
c:remove()
if player.Character.Humanoid.Health == 100 then
player[i].Character:MoveTo(Vector3.new(0, 0.2, 0))
end
end
end
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:26 PM
@Dragon
The thing is you can't insert a hint, unless it's through a script.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Oct 2011 12:27 PM
And please explain what you want it to do?

Also with this line here :

local m = math.random(1,1)

I know you have it at 1 because there's currently only one map however, if the first interger is 1 then you don't have to include it and can just do this

local m = math.random(n)

where n is the maximum interger you want it to reach.
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 12:27 PM
try changing these

local c = Instance.new("Hint", workspace")

local x = Instance.new("Hint", workspace")

to

local c = Workspace.Hint

local x = Workspace.Hint
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
21 Oct 2011 12:27 PM
Instance.new("Hint",workspace).Name = "Hint"?
Problem?
Report Abuse
dragon829 is not online. dragon829
Joined: 12 Aug 2008
Total Posts: 741
21 Oct 2011 12:28 PM
jango thats why you type this into command bar

Instance.new("Hint", Workspace)
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Oct 2011 12:35 PM
I see a lot wrong with it, yet you still haven't followed the rules with how to properly ask a question on this forum.
Report Abuse
thejoker1997 is not online. thejoker1997
Joined: 19 Aug 2009
Total Posts: 155
21 Oct 2011 12:36 PM
What does the output say? Also I am not sure but the way you set up you're prints just doesn't seem right.
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:49 PM
@thejoker
Well, It says nothing about the prints.
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:50 PM
@SDuke12
I want it to make minigames and teleport the players to the minigame but it isn't working. I'll also try
local m = math.random(n)
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:51 PM
@dragon
I feel stupid. How'd I forget the command bar...
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Oct 2011 12:52 PM
And what does it actually do? Does the hint show up or does it just error because of :

player[i].Character:MoveTo(Vector3.new(-145, 1.6, 302.5))

?
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 12:55 PM
The error is the player[i]

The hint worked perfectly but when it got there the error showed up on that line.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Oct 2011 12:59 PM
Well I'm guessing you thought that by putting

local player = game.Players:GetPlayers()
for i = 1, #player do
end

up at the top, that immediately worked. For that line to work it would have to be INSIDE what I just posted. I recommend just delete those 3 lines that I just posted and on the line where it's erroring, replace it with this :

for _,v in pairs(game.Players:GetPlayers()) do
pcall(function() v.Character:MoveTo(Vector3.new(-145, 1.6, 302.5))
end

Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 01:02 PM
Thank you! I'll tell you if it works.
Report Abuse
supercheese200 is not online. supercheese200
Joined: 08 Dec 2009
Total Posts: 235
21 Oct 2011 01:59 PM
@SDuke,

You missed the end off the end of the Pcall.
Report Abuse
SDuke524 is not online. SDuke524
Joined: 29 Jul 2008
Total Posts: 6267
21 Oct 2011 02:06 PM
whoops, thanks for that

for _,v in pairs(game.Players:GetPlayers()) do
pcall(function() v.Character:MoveTo(Vector3.new(-145, 1.6, 302.5); end)
end
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
21 Oct 2011 05:19 PM
Nope still nothing. It says a ') ' is expected near ;
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
21 Oct 2011 05:23 PM
^ he missed a )**strong text**
Report Abuse
darkjunior is not online. darkjunior
Joined: 05 Sep 2008
Total Posts: 2224
21 Oct 2011 05:46 PM
[ Content Deleted ]
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
21 Oct 2011 05:48 PM
Another thing about your script is that it is inefficient...Just pointing that out.
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
24 Oct 2011 06:02 PM
I just retyped it. I'll try it out later tonight.
Report Abuse
jango464 is not online. jango464
Joined: 30 Jul 2009
Total Posts: 4913
29 Oct 2011 09:24 AM
Okay everything worked. There's one last problem on line 80.

z = "Loaded"
print(z)

x = "Still working on it, hope you like it so far!"
print(x)

local t = Instance.new("Hint", workspace)
t.Text = "Welcome to jango464's minigames III!"
wait(5)
t.Text = "This is the best version yet."
wait(5)
t.Text = "No freemodels..."
wait(2)
t.Text = "Not copied..."
wait(2)
t.Text = "And Best Of all, there will be a shop when the game is complete!"
wait(7)
t.Text = "To report bugs, please send me a message. I would really appreciate it!"
wait(8)
t.Text = "Please enjoy the game!"
wait(2)
t.Text = "Starting minigames..."
t:remove()

while true do
wait(2)
local m = math.random(1,1)
local player = game.Players:GetPlayers()
for i = 1, #player do
end
if m == 1 then
local hin = Instance.new("Hint", workspace)
hin.Text = "Choosing minigame."
wait(1)
hin.Text = "Choosing minigame.."
wait(1)
hin.Text = "Choosing minigame..."
wait(5)
hin.Text = "Minigame found!"
wait(3)
hin.Text = "This minigames name is..."
wait(4)
hin.Text = "Ball jump!"
wait(2)
hin.Text = "Jump to the shiny brick at the end and touch it to earn points to buy items!"
wait(7)
hin.Text = "Loading minigame..."
wait(2)
hin.Text = "Loaded!"
wait(1)
hin.Text = "Game starting in..."
wait(3)
hin.Text = "...3..."
wait(1)
hin.Text = "..2.."
wait(1)
hin.Text = ".1."
wait(1)
hin.Text = "Start jumping!"
wait(2)
game.Lighting.Minigame1:clone().Parent = game.Workspace
wait(2)
for _,v in pairs(game.Players:GetPlayers())do
pcall(function() v.Character:MoveTo(Vector3.new(108, 11.8, 78));end)
end
hin:remove()
wait(60)
game.Workspace.Minigame1["Points Brick"]:remove()
local c = Instance.new("Hint", workspace)
c.Text = "Minigame over!"
wait(3)
c.Text = "Congratulations to the winner or winners!"
c:remove()
for _,v in pairs(game.Players:GetPlayers())do
pcall(function() v.Character:MoveTo(Vector3.new(0, 0.2, 0));end)
end
game.Workspace.Minigame1:remove()
end
end
end

In the output it says, Workspace.Minigame Script:80:'< eof >' expected near 'end'
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