leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:04 PM |
Hi, I am making a survival game. It works fine in test mode, but not in play mode. I have tried placing a different script in and run the game, the other script run but not the main one. I have tried uploading the game to a different place, that does not work either. Finally I tried running the script (with all the parts called for) And that does not work. It must be a problem with the code, but I cant tell whats wrong. I will donate 1,000 robux to the first one to solve this. Thanks. I know its a lot to ask (and read) but I will give a 1,000 robux prize.
M = game.Workspace.Message boom = Instance.new("Explosion") quack = Instance.new("Explosion")
while true do world = game.Workspace.world clone = game.Workspace.world:Clone() round.Value = math.random(1,3)
if (round.Value == 1) then M.Text = "The round is....... EXPLOSIVES! >:D" wait (5) M.Text = "" boom.BlastRadius = 30 boom.Position = game.Workspace.SpawnLocation.Position wait(1) boom.Parent = game.Workspace
end
if (round.Value == 2) then M.Text = "Oh noes, evil duck!" wait (5) M.Text = "" duck = Instance.new("Part") mesh = Instance.new("SpecialMesh") mesh.MeshId = ("http://www.roblox.com/asset/?id=14810664") mesh.TextureId = ("http://www.roblox.com/asset/?id=14810649") mesh.Parent = duck duck.Position = Vector3.new(-102, 124.7, -338)
duck.Parent = game.Workspace
M.Text = "Quack." wait (3) M.Text = "" wait(5) quack.Position = duck.Position quack.Parent = game.Workspace duck:Remove() end
if (round.Value == 3) then M.Text = "uh oh, a rift from the bawlz demension is opening up!!!!!!" wait (5) M.Text = "" ball = Instance.new("Part") ball.Reflectance = 0.3 ball.Transparency = 0.3 ball.Shape ="Ball" ball.Size = Vector3.new(16, 16, 16) ball.Position = Vector3.new(-108, 193.1, -337) ball.Parent = game.Workspace
end
print(round.Value)
wait (3)
world:Destroy() wait(0.01)
clone.Parent = game.Workspace
end |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:07 PM |
Take out the "boom" and "quack" unless they're parents with the property of that model. If they are not then re-write that section and add in "blastradious". Hope this helped! -Clone |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:09 PM |
| Found another bug,look closely,you forgot to add in a " with the msg property in the script. |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:11 PM |
| What do you mean rewrite it with a blastradius? They are just what I use to call for the bomb. And it all works great in test mode, but not in play mode. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:12 PM |
| nvm about the blast radious. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:14 PM |
Well did you try adding in those quotations?
|
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:14 PM |
| Why would it work in test but not in play? It makes no sense. Its the 1,000 dollar question! |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:15 PM |
| I cant see where its missing, which part? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:15 PM |
| Hey Lep, I was sitting next to you in the Hackathon with the MacBook Pro. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:16 PM |
| WOW I was looking at it wrong again! Fail. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:17 PM |
| Only thing I can think of is the mesh's. |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:17 PM |
| Lol, what do you think would cause it to work in one mode and not the other? |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
| |
|
|
| 25 Jul 2012 03:19 PM |
Try changing
boom.Position = game.Workspace.SpawnLocation.Position
to
spawnl = Workspace.SpawnLocation boom.CFrame = spawnl.CFrame |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:19 PM |
| hmm... maybe you forgot to add something to it for it to work right on play mode. |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:20 PM |
| @dead how would that be any different? |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 25 Jul 2012 03:20 PM |
Try changing this line clone = game.Workspace.world:Clone() to this clone = world:Clone()
and also if that does not work put a wait(3) at the very top |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
| |
|
|
| 25 Jul 2012 03:22 PM |
| wait(3) would just make it 3 seconds longer to load in. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 25 Jul 2012 03:23 PM |
If that doesn't work I noticed you a putting unnecessary spaces in your wait()'s for example : wait (3) try taking the space out of each of them that have a space in the middle |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
|
| 25 Jul 2012 03:26 PM |
| But if there were any bugs that would keep the code from running, it would not work in test. Something else has to be wrong! But what is the difference between test mode and play mode? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:27 PM |
| Do you have any free models in your place? If so then try taking them out. |
|
|
| Report Abuse |
|
|
leperdy
|
  |
| Joined: 07 Dec 2008 |
| Total Posts: 1406 |
|
| |
|
|
| 25 Jul 2012 03:28 PM |
| test mode is for testing and game mode is for playing. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2012 03:31 PM |
| or why not try ask link1099? isn't he RI's tech developer? |
|
|
| Report Abuse |
|
|