|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 26 Nov 2012 03:52 PM |
| Oh, and Global functions don't work in Local Scripts (as I learnt today) |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|