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: Scripts only work in solo mode.

Previous Thread :: Next Thread 
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
22 Oct 2012 05:16 PM
What could be some reasons why scripts can work perfectly fine in solo mode but when I start up a server and add a player with Roblox studio all the scripts don't work. ANy reasons why?
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
22 Oct 2012 05:20 PM
Chances are you have certain methods/events that can only be used in a server script, or a local script, in the wrong type of script.

General things that can't be used locally:
Persistence data
LoadCharacte
Global functions (not variables)

Things that can't be used server-side:
LocalPlayer
anything having to do with the mouse/camera

Just a couple main things that commonly cause that kind of error.
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
22 Oct 2012 05:20 PM
I can't help (Maybe its something to do with local I'm still learning)

What was that about adding a player on a server?
Can you have 2 ROBLOX games open on one laptop?

This would help me a lot with testing my scripts...
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
22 Oct 2012 05:22 PM
There was a time you could have 2 Robox games open on one laptop, but I do believe it was patched. (This was early 2012) You need two different computers once again.
Report Abuse
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
22 Oct 2012 05:23 PM
@Wood
I know, But I think this guy just said he did it?
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
22 Oct 2012 05:24 PM
No, he's talking about how a script works while testing in offline-mode with Roblox Studio, but don't work in online-mode playing on a real server.
Report Abuse
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
22 Oct 2012 05:59 PM
I tried chaning all "player = game.Players.LocalPlayer" with "player = game.Players:FindFirstChild(script.Parent.Parent.Parent.Name)"
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
22 Oct 2012 06:02 PM
Is this in a Local or Server (normal) script?

If that doesn't work and it is server, this might do it if you have the parents wrong


local player
for _,v in pairs(game:GetService("Players"):GetPlayers())do
if script:IsDescendantOf(v)then
player=v
end
end
Report Abuse
pikminix is not online. pikminix
Joined: 10 Jul 2009
Total Posts: 57
10 Jul 2013 01:49 AM
bump.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Jul 2013 01:54 AM
F7, wait a bit, Alt-F7
Report Abuse
Antagonizing is not online. Antagonizing
Joined: 08 Jul 2013
Total Posts: 59
10 Jul 2013 01:56 AM
F7?

[-] FlameH1 [O] Twitter [-]
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Jul 2013 01:57 AM
Start Server. Alt for Start Player. It's like a normal server, only you can see the output
Report Abuse
Antagonizing is not online. Antagonizing
Joined: 08 Jul 2013
Total Posts: 59
10 Jul 2013 01:59 AM
02:58:43.009 - Players.Player1.PlayerGui.LocalScript:5: attempt to index upvalue 'character' (a nil value)
02:58:43.021 - Script "Players.Player1.PlayerGui.LocalScript", Line 5
02:58:43.022 - stack end
02:58:43.023 - Disconnected event because of exception
Teleport Spell Loaded
Cutscene Editor Loaded

[-] FlameH1 [O] Twitter [-]
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Jul 2013 02:00 AM
Pm me the code
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