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: Script not working, odd output

Previous Thread :: Next Thread 
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 06:39 AM
"Workspace.Door.Group Chat:29: unexpected symbol near ')'"

I think I might be missing an end or something, but I would like verification.

Here's the script:

game.Players.PlayerAdded:connect(function(pa)
pa.Chatted:connect(function(msg)
if pa:IsInGroup(165491) then --group id
if string.lower(msg) == "[]startsimulation" then
local warn = Instance.new ("Message")
warn.parent = workspace
warn.text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM."
if string.lower(msg) == "[]no" then return end
if string.lower(msg) == "[]confirm" then
warn:remove()
local intro = Instance.new ("Message")
intro.Parent = workspace
intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running."
wait(5)
intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions."
wait(10)
intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn."
wait(10)
intro:remove()
for i = 0,1, 0.1 do
script.Parent.Transparency = i
wait(.1)
end
script.Parent.CanCollide = false
end
end
end)
end)
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 06:43 AM
The output is referring to the second to last end, where it says end).
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
03 Jul 2012 06:49 AM
I can't find anything wrong with the script, but I would use :Destroy() instead of :remove()
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 06:50 AM
Why destroy?

I was told that they're pretty much the same.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 06:55 AM
:Destroy() makes it permanently removed, if I'm not mistaken, whilst :remove() only makes it = nil.
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:01 AM
Okay well this is the script now after changing the removes to Destroys, with the "--AdvorsusDuo" being line 1.

--AdvorsusDuo

game.Players.PlayerAdded:connect(function(pa)
pa.Chatted:connect(function(msg)
if pa:IsInGroup(165491) then --group id
if string.lower(msg) == "[]startsimulation" then
local warn = Instance.new ("Message")
warn.parent = workspace
warn.text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM."
if string.lower(msg) == "[]no" then return end
if string.lower(msg) == "[]confirm" then
warn:Destroy()
local intro = Instance.new ("Message")
intro.Parent = workspace
intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running."
wait(5)
intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions."
wait(10)
intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn."
wait(10)
intro:Destroy()
for i = 0,1, 0.1 do
script.Parent.Transparency = i
wait(.1)
end
script.Parent.CanCollide = false
end
end
end)
end)

The output still says Workspace.Door.Group Chat:29: unexpected symbol near ')'
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:10 AM
I think... You need another end.

Four "if"s, one "for", and two "functions" = 7 ends. You have 6...
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:10 AM
But, wait... No...
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:14 AM
No, I added an end, and now the script seems to be working correctly according to the output.

When I went to test it in my regular place (not play solo) I said "[]startsimulation" and nothing happened.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:15 AM
Yeah I noticed. Trying to think what that problem is.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:17 AM
Parent is supposed to be with a capital, right?
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:21 AM
Indeed, I just fixed that, still nothing happening.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:21 AM
How about Text right under the non-capitlised Parent?
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:26 AM
Ha, just fixed that and now the beginnning works, but when I use the command as shows "[]no" and "[]confirm" the script doesn't do anything else and the message is stuck.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:30 AM
Now, I'm thinking about that and I'm thinking this.

:remove() <3
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:30 AM
This is what I have now, line 1 starting at "--AdvorsusDuo":

--AdvorsusDuo

game.Players.PlayerAdded:connect(function(pa)
pa.Chatted:connect(function(msg)
if pa:IsInGroup(165491) then --group id
if string.lower(msg) == "[]startsimulation" then
local warn = Instance.new ("Message")
warn.Parent = Workspace
warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM."
if string.lower(msg) == "[]no" then return end
if string.lower(msg) == "[]confirm" then
warn:Destroy()
local intro = Instance.new ("Message")
intro.Parent = Workspace
intro.Text = "-AdvorsusDuo- TRARAIDSIM.exe running."
wait(5)
intro.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions."
wait(10)
intro.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn."
wait(10)
intro:Destroy()
for i = 0,1, 0.1 do
script.Parent.Transparency = i
wait(.1)
end
script.Parent.CanCollide = false
end
end
end
end)
end)
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:30 AM
derp lemme try that
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:32 AM
Changing the destroys back to removes didn't change anything ._.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:41 AM
Well, I have a theory.

Just let me do a quick read and also let me ask this...

Why not use your first message for the messages after? Instead you make the first message go away and a new message appear instantly after that.

Also nevermind, found what I was looking for. Maybe this will work? I changed the "intro" into "warn", 'cause it made me feel better, and then I put an "elseif" instead of a second "if". I also never copied your name :3

game.Players.PlayerAdded:connect(function(pa)
pa.Chatted:connect(function(msg)
if pa:IsInGroup(165491) then --group id
if string.lower(msg) == "[]startsimulation" then
local warn = Instance.new ("Message")
warn.Parent = workspace
warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM."
if string.lower(msg) == "[]no" then return end
if string.lower(msg) == "[]confirm" then
warn.Text = "-AdvorsusDuo- TRARAIDSIM.exe running."
wait(5)
warn.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions."
wait(10)
warn.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn."
wait(10)
warn:Destroy()
for i = 0,1, 0.1 do
script.Parent.Transparency = i
wait(.1)
end
script.Parent.CanCollide = false
end
end
end)
end)
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:43 AM
Add another end to that.
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:43 AM
Wait, what?

Wrong Copy/paste. One second.

game.Players.PlayerAdded:connect(function(pa)
pa.Chatted:connect(function(msg)
if pa:IsInGroup(165491) then --group id
if string.lower(msg) == "[]startsimulation" then
local warn = Instance.new ("Message")
warn.Parent = workspace
warn.Text = "-AdvorsusDuo- Please confirm execution of TRARAIDSIM."
if string.lower(msg) == "[]no" then return end
elseif string.lower(msg) == "[]confirm" then
warn.Text = "-AdvorsusDuo- TRARAIDSIM.exe running."
wait(5)
warn.Text = "-AdvorsusDuo- Please listen to your trainers for further instructions."
wait(10)
warn.Text = "-AdvorsusDuo- TRA Raid Simulation will now begin. Split teams evenly and go to the red spawn or blue spawn."
wait(10)
warn:Destroy()
for i = 0,1, 0.1 do
script.Parent.Transparency = i
wait(.1)
end
script.Parent.CanCollide = false
end
end
end)
end)


THAT'S BETTER!
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:52 AM
it didn't work >:(
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:54 AM
regardless of what I say, the warn message does not change
Report Abuse
Nartle is not online. Nartle
Joined: 29 Mar 2008
Total Posts: 7202
03 Jul 2012 07:54 AM
Dang! Same thing happened?
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
03 Jul 2012 07:58 AM
yea

I think maybe the "then return end" may be doing something do it. Is there a way we could sort of "restart" the script on the command "[]no"?
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