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
 

Why doesnt this work?

Previous Thread :: Next Thread 
TerexEquipment is not online. TerexEquipment
Joined: 20 Dec 2010
Total Posts: 267
06 Feb 2014 09:10 PM
local Bases = {"PlotOne", "PlotTwo", "PlotThree", "PlotFour","PlotFive", "PlotSix", "PlotSeven", "PlotEight"}

function onChildRemoved( player )
for i = 1, #Bases do
if workspace:findFirstChild( Bases[i] ) ~= nil then
if workspace[ Bases[i] ].Owner.Value == player.Name then
RegenBase( Bases[i] )
end
end
end
end

game.Players.ChildRemoved:connect( onChildRemoved )

It says line 9 which is "RegenBase( Bases[i] )" is trying to make the regen a nil or something like that
Report Abuse
TerexEquipment is not online. TerexEquipment
Joined: 20 Dec 2010
Total Posts: 267
07 Feb 2014 05:39 AM
Bump
Report Abuse
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
07 Feb 2014 06:05 AM
Does the function RegenBase() exist?
Report Abuse
TehIcyStar is not online. TehIcyStar
Joined: 07 Mar 2010
Total Posts: 1649
07 Feb 2014 07:33 AM
I'm pretty sure 'workspace' needs a capital W
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
07 Feb 2014 07:34 AM
Nope. It doesn't
Report Abuse
LilJoker4675 is not online. LilJoker4675
Joined: 31 Oct 2011
Total Posts: 220
07 Feb 2014 07:49 AM
W = Capital
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
07 Feb 2014 07:52 AM
Nope. Doesnt need to be.
workspace
and
Workspace
Work.
Unless its game.workspace i think,
But
"workspace." works
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
07 Feb 2014 08:02 AM
workspace is a predefined rbx.lua variable.
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
07 Feb 2014 08:31 AM
as he said above, is regenbase a function?
Report Abuse
TerexEquipment is not online. TerexEquipment
Joined: 20 Dec 2010
Total Posts: 267
07 Feb 2014 02:03 PM
Doesnt metter if the W is capital or not. Heres the output i get:
15:02:56.418 - Workspace.PlotRegen:9: attempt to call global 'RegenBase' (a nil value)
15:02:56.419 - Script 'Workspace.PlotRegen', Line 9
15:02:56.428 - stack end

Report Abuse
TerexEquipment is not online. TerexEquipment
Joined: 20 Dec 2010
Total Posts: 267
07 Feb 2014 02:05 PM
I dont know if the function RegenBase() exists
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
07 Feb 2014 02:30 PM
Solution: Don't use RegenBase because it does not exist OR tell me what you're trying to do and I'll create the regenbase method for you.
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
07 Feb 2014 02:49 PM
Workspace can be workspace or Workspace..
Report Abuse
TerexEquipment is not online. TerexEquipment
Joined: 20 Dec 2010
Total Posts: 267
09 Feb 2014 02:56 PM
Bump
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