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 » Scripters
Home Search
 

Re: If I put a Script into 'ServerScriptService'

Previous Thread :: Next Thread 
FaZeEdan223 is not online. FaZeEdan223
Joined: 19 Jul 2015
Total Posts: 51
31 Jan 2017 02:57 PM
would the script apply for all scripts? for example the script is a variables script..

here it is:

--Variables
function Variables
function variablesKartNames
Hoverkart = game.workspace.HoverKart
Classickart = game.workspace.ClassicKart
SpeedyRacer = game.workspace.SpeedyRacer
BattleRam = game.workspace.BattleRam
MonsterKart = game.workspace.MonsterKart
GlassAssasin = game.workspace.Glassassasin
end

function variablesKartAbility
Fly = game.workspace.HoverKart.Ability
end

end


-Your Fellow Scripter,
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
31 Jan 2017 02:58 PM
No, if you want to share code across several scripts you need to use the global table, _G, or module scripts.


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow my twitch: twitch.tv/austinrblx
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
31 Jan 2017 02:58 PM
That's not how you declare variables.
Report Abuse
ElectroRBX is not online. ElectroRBX
Joined: 12 Dec 2016
Total Posts: 39
31 Jan 2017 03:00 PM
I think, yes except the fly one. Go on check it out, Im not soo good at scripting.
Report Abuse
FaZeEdan223 is not online. FaZeEdan223
Joined: 19 Jul 2015
Total Posts: 51
31 Jan 2017 03:00 PM
well thanks for replying, but that wasnt what I was asking, But either way if that is not please give me an example of how I declare variables


-Your Fellow Scripter,
Report Abuse
FaZeEdan223 is not online. FaZeEdan223
Joined: 19 Jul 2015
Total Posts: 51
31 Jan 2017 03:01 PM
thanks!


-Your Fellow Scripter,
Report Abuse
ElectroRBX is not online. ElectroRBX
Joined: 12 Dec 2016
Total Posts: 39
31 Jan 2017 03:01 PM
No, i just found out. it wont work.
Report Abuse
FaZeEdan223 is not online. FaZeEdan223
Joined: 19 Jul 2015
Total Posts: 51
31 Jan 2017 03:02 PM
oh, well im not 100% good with scripting as I am starting out, I appreciate all of your replies!


-Your Fellow Scripter,
Report Abuse
ElectroRBX is not online. ElectroRBX
Joined: 12 Dec 2016
Total Posts: 39
31 Jan 2017 03:02 PM
If you need help, go and search roblox wiki, its really helpful... if you didnt know about it.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
31 Jan 2017 03:03 PM
Write the variables at the top of each script. Please.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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