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: Script works in solo but not in online.

Previous Thread :: Next Thread 
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
26 Nov 2012 03:38 PM
Hi,

I have a script that animates the players Right Hip.
Now the problem is, for no apparent reason it stopped working.
I go in onlinemode and I manually set the angle of the leg and then the leg adjust itself.
But I have to be fast because the script is actually updating the leg angle except when it does it, the player leg does not move at all.

I tried using both local and common scripts but nothing works.
It worked perfect earlier today and all of a sudden it stopped working aswell as many other functions (that I had not moddified.)..

Has roblox become this bad? Is it impossible to do such a simple feat without roblox breaking everything?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
26 Nov 2012 03:42 PM
I don't know much about animation, but one thing is that in solo, everything is local, even a normal script becomes local.

Maybe you need a combination of both scripts.
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
26 Nov 2012 03:49 PM
Do not use LocalScripts for Animation. Make a global Animation Function like so:

_G.AnimateHip = function(player)
if not (game.Players:findFirstChild(player)) then return end
local p = game.Players[player]
local c = p.Character
-- Animate the parts with c["Left Arm"].CFrame = blah, or any other method of your choice
end

To make using this function easier, add the following code to the top of your script:
repeat wait() until _G.AnimateHip
function animate(player) _G.AnimateHip(player) end

Then you can use it like so:
animate("thumper10")

~ Follow me @thumper6913 ~
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
26 Nov 2012 03:50 PM
NOTE: You don't have to make it a Global Function, but it saves time and makes scripts more efficient.

~ Follow me @thumper6913 ~
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
26 Nov 2012 03:52 PM
Oh, and Global functions don't work in Local Scripts (as I learnt today)
Report Abuse
thumper10 is not online. thumper10
Joined: 17 Apr 2009
Total Posts: 3304
26 Nov 2012 03:55 PM
Yes they do. Just don't create them in LocalScripts, derp.

~ Follow me @thumper6913 ~
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
26 Nov 2012 03:56 PM
Nice one @thumper
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
26 Nov 2012 03:58 PM
I'm just using an edited "Animate" localscript that is always in your character when you spawn.
I can't understand why it should work but mine wont.

It sound's like I'm making a huge workaround for something that could be solved easier..
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
26 Nov 2012 03:59 PM
Thumper, you're misinformed.

I create my global functions in a regular script, and then I used them in a LocalScript (put in a GUI) and they do not work. When I changed the localscript to a regular script, it worked fine.
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
26 Nov 2012 03:59 PM
Btw my Animate does work, it's just that the model doesn't care about the updated angles..
Report Abuse
PlaceRebuilder is not online. PlaceRebuilder
Joined: 29 Apr 2008
Total Posts: 1056
26 Nov 2012 04:14 PM
Ok now it's working again.
By removing the old Animate right after loading my new one makes the new one work.

Just terrible roblox. Terrible.
Report Abuse
TigerBloodd is not online. TigerBloodd
Joined: 24 Oct 2010
Total Posts: 2430
26 Nov 2012 06:18 PM
use fake limbs
Report Abuse
CaptainSandbox is not online. CaptainSandbox
Joined: 08 Oct 2012
Total Posts: 908
26 Nov 2012 08:04 PM
...


I started remaking R2D...

So now he rejoins ROBLOX and starts remaking the original deleted one?

...

Fml
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