|
| 08 May 2014 11:42 PM |
It's not working :(, suppose to clone an animation into your character when you click the gui and play it.
player = script.Parent.Parent.Parent.Parent.Parent anim = game.ServerStorage:findFirstChild("SleepAnim") -- put the excact weapon name here. the weapon has to be in game ServerStorage
function buy() local animTrack = player.Humanoid:LoadAnimation(SleepAnim) -- info dissapears also local a = anim:clone() a.Parent = player.Humanoid animTrack:Play()
end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|
| |
|
lama321
|
  |
| Joined: 18 Dec 2011 |
| Total Posts: 300 |
|
|
| 09 May 2014 12:28 AM |
I think your problem is that you try to load the 'SleepAnim' animation without referencing what it is, fix it by doing this
function buy() local a = anim:clone() a.Parent = player.Humanoid local animTrack = player.Humanoid:LoadAnimation(a) -- info dissapears also animTrack:Play()
end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|