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: Script not automatically running?

Previous Thread :: Next Thread 
ASpoonfullOfSucrose is not online. ASpoonfullOfSucrose
Joined: 28 Oct 2015
Total Posts: 442
30 Nov 2016 03:34 AM
I'm using a script to move a localscript from ReplicatedStorage to the Player (not character).

The script placed in player:
repeat
print("waiting")
wait()
until script.Parent.ClassName == "Player"

The one that moves it:
local Scriptz = rep.PlayerScripts.Scriptx:Clone()
Scriptz.Parent = [player]

The script moves into player, but never prints any "Waiting"'s, so I guess it's not running for some reason.
Report Abuse
ASpoonfullOfSucrose is not online. ASpoonfullOfSucrose
Joined: 28 Oct 2015
Total Posts: 442
30 Nov 2016 03:36 AM
There is a print below the repeat which just prints "starting" if the repeat ever finishes. But the print in the repeat doesn't print nor the print below it.
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
30 Nov 2016 03:41 AM
scripts dont run in replicated storage, they only run in serverscriptservice, so...


$.get('gud')
Report Abuse
ASpoonfullOfSucrose is not online. ASpoonfullOfSucrose
Joined: 28 Oct 2015
Total Posts: 442
30 Nov 2016 03:53 AM
Read it again...
Report Abuse
iSymon is not online. iSymon
Joined: 19 Nov 2011
Total Posts: 1023
30 Nov 2016 07:04 AM
Not sure if scripts run in Players neither. Why don't you have it cloned into PlayerScripts ?


If you can read, you can code.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
30 Nov 2016 07:15 AM
I'm just not quite sure now if they even run in the Player object itself but what you could test is, if it runs in the PlayerGui (there it definitely does and it's a descendant of the Player object so...).

Other than that, did you only check the server or the client? I assume it might also only print on the client if it's a localscript in case FE is enabled? Didn't do much with FE yet...
Report Abuse
Lima_b3an is not online. Lima_b3an
Joined: 29 Jul 2016
Total Posts: 8
30 Nov 2016 07:32 AM
You can try to place the script in replicatefirst(only if its a localscript)


Once and for all
Report Abuse
Lima_b3an is not online. Lima_b3an
Joined: 29 Jul 2016
Total Posts: 8
30 Nov 2016 07:33 AM
I did my best to understand what youre trying to do here. I am assuming you want the script to run inside your player. make sure the script is a LocalScript, that may work better


Once and for all
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