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: Why is this not running in a server

Previous Thread :: Next Thread 
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 12:41 PM
print("RUNNING")
local player = game.Players:GetPlayerFromCharacter(script.Parent)
local mainscript = player.PlayerGui:WaitForChild("MyScripts"):WaitForChild("Main"):Clone()
mainscript.Parent = script.Parent
mainscript.Disabled = false
print(mainscript)

This is just in a script in StarterCharacter scripts. For some reason, even though it is in my character in the server, it never runs. Never even prints ("RUNNING"). It's a server script.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 12:42 PM
that's the entire script? it's enabled, right?

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 12:44 PM
Yes. It's really strange because it works perfectly in studio but not in-game. I have other server scripts in StarterCharacter that work 100% fine so I have no clue what's wrong with it.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 12:44 PM
is FilteringEnabled set to true?

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 12:45 PM
No
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 12:46 PM
wattt

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 12:47 PM
I'm going to try putting the code in a script that is working in StarterChracterScripts.
Also Toxic aren't you from RT? Do you remember Klink45?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 12:48 PM
u sicko!




yes lol

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
16 Dec 2016 01:51 PM
Lol.
Normal scripts don't run inside of Player[Insert folder name]
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 01:52 PM
^ please read. it's inside of StarterCharacterScripts

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
16 Dec 2016 02:06 PM
Please learn.

StarterPlayerScripts creates the scripts to PlayerScripts under Player, PlayerScripts do not replicate back to the server. Therefore, your script will not run.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
16 Dec 2016 02:23 PM
oh my god how dumb are you
StarterCharacterScripts and StarterPlayerScripts are two different objects

Formerly ToxicDominator - add 30,319 posts
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 05:44 PM
It's supposed to load this script into their character.
Also putting the code in another script did not work either. Strange.
Report Abuse
Stormersoul is not online. Stormersoul
Joined: 24 Jan 2012
Total Posts: 2410
16 Dec 2016 05:46 PM
Just use StarterCharacterScripts. It's 99% easier.


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
16 Dec 2016 05:47 PM
This is in StarterCharacterScripts. It is replicated to their character but never runs, even though it isn't disabled.
Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
19 Dec 2016 07:50 AM
Just because it's replicated to the character doesn't mean it's bound to run. What you're trying to do should be done in Backpack instead. Cease your stupidity.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Dec 2016 03:04 PM
LOL

Formerly ToxicDominator - add 30,319 posts
Report Abuse
SirTipsAlot is not online. SirTipsAlot
Joined: 08 Feb 2012
Total Posts: 2431
19 Dec 2016 03:06 PM
"Normal scripts don't run inside of Player[Insert folder name]"

"What you're trying to do should be done in Backpack instead"

self contradictory?


Report Abuse
exoSentinel is not online. exoSentinel
Joined: 18 Mar 2012
Total Posts: 2795
19 Dec 2016 03:13 PM
You shouldn't call people stupid if you don't have confidence in your own answers bud.
Report Abuse
Rerumu is not online. Rerumu
Joined: 11 Oct 2014
Total Posts: 950
19 Dec 2016 07:53 PM
You shouldn't twist people's words to seem right.
Player[Insert folder name] referring to the fact that nothing that is non-native to the player will run a script, and even then only local scripts run in the Scripts folder.
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
19 Dec 2016 07:55 PM
It was fun to read you guys' comments.
I ended up using remoteevents and telling the server to do it when the player spawned in. It works fine now.

Thanks.
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