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: Different between "build" and actual playing?

Previous Thread :: Next Thread 
bigkopa is not online. bigkopa
Joined: 05 Mar 2015
Total Posts: 448
21 Jul 2015 11:46 PM
Whenever I play my game to test it out, a lot of my scripts are broken.

But when I go to build mode everything works just fine?

What do I have to do so that it works when someone actually plays the game
Report Abuse
Funse is not online. Funse
Joined: 11 Jun 2012
Total Posts: 7887
21 Jul 2015 11:47 PM
turn off filtering enabled.
Report Abuse
bigkopa is not online. bigkopa
Joined: 05 Mar 2015
Total Posts: 448
21 Jul 2015 11:49 PM
It's been off
Report Abuse
bigkopa is not online. bigkopa
Joined: 05 Mar 2015
Total Posts: 448
21 Jul 2015 11:52 PM
That's weird.. I turned it on and now it's working..

I don't understand this lol
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
21 Jul 2015 11:53 PM
local scripts need something like
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()

that or you're trying to do local only stuff in a regular script or vice versa
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
21 Jul 2015 11:54 PM
There's a small chance it will work without the code above, which is probably what you experienced after turning FE on.
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
21 Jul 2015 11:56 PM
it's because in build mode, all of your game is ran on your computer, you're not connected to a server. all of your scripts run on the client.

therefore your scripts are bound to work 99.9% of the time because they are ran on the client (despite being a "server" script)

so in build/offline mode you could use game.Players.LocalPlayer in a serverscript

because that script is running on the client

and sometimes you need to use :WaitForChild() so your script yields for objects that you know will exist for sure
Report Abuse
bigkopa is not online. bigkopa
Joined: 05 Mar 2015
Total Posts: 448
21 Jul 2015 11:58 PM
thanks for the help all
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
22 Jul 2015 12:02 AM
Just because the scripts are ran on the client doesn't mean they will practically function better. So that is wrong.

You see, build mode is composed of the debugging mode. You can modify script code, build and do all that.

When the ROBLOX game is ran, all the code is compiled and ran in protected mode, Rbx.lua is hereby more restricted and the game runs, it is complex to explain so i'll just make it simple: During the game, more limits are put on the scripts so they run more limited to the user, while in studio it is open completely.


You can practically run RobloxLocked code (not all of it) in the Studio Command Bar.

ʏᴏᴜ ᴛʜᴏᴜɢʜᴛ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴅʀᴀɢ ᴍᴇ ᴛᴏ ᴛʜᴇ ʙᴏᴛᴛᴏᴍ ᴏғ ᴛʜᴇ ʟᴀᴋᴇ sᴏ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴇᴀᴛ ᴍᴇ ʟᴀᴛᴇʀ... ᴡᴇʟʟ ɢᴜᴇss ᴡʜᴀᴛ ᴘᴜɴᴋ... ɪᴍ ᴀ ғɪsʜ... ᴡɪᴛʜ ʟᴇɢs
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
22 Jul 2015 12:03 AM
"Just because the scripts are ran on the client doesn't mean they will practically function better. So that is wrong."

never said they would run better

i said they are more likely to work (excluding if you make a syntax error of course) if you do something stupid like using .LocalPlayer in a server script

Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
22 Jul 2015 12:05 AM
In Studio they run faster/slower depending on the client, that is all. The code is the same, everything is the same.

Server Scripts in studio are ran in the computer, which opens further what you can do

ʏᴏᴜ ᴛʜᴏᴜɢʜᴛ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴅʀᴀɢ ᴍᴇ ᴛᴏ ᴛʜᴇ ʙᴏᴛᴛᴏᴍ ᴏғ ᴛʜᴇ ʟᴀᴋᴇ sᴏ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴇᴀᴛ ᴍᴇ ʟᴀᴛᴇʀ... ᴡᴇʟʟ ɢᴜᴇss ᴡʜᴀᴛ ᴘᴜɴᴋ... ɪᴍ ᴀ ғɪsʜ... ᴡɪᴛʜ ʟᴇɢs
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