GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 23 Dec 2016 08:08 PM |
this is in the roblox animation script.. in an npc.. couldnt get to work regularly so i changed onFreeFalls Animation id
-- connect events Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(onJumping) Humanoid.Climbing:connect(onClimbing) Humanoid.GettingUp:connect(onGettingUp) --Humanoid.FreeFalling:connect(onFreeFall) -- Block Humanoid.FallingDown:connect(onFallingDown) Humanoid.Seated:connect(onSeated) Humanoid.PlatformStanding:connect(onPlatformStanding) Humanoid.Swimming:connect(onSwimming)
game.ReplicatedStorage.Events.Block.OnServerEvent:connect(function() -- Npc Block print'Running Animation' onFreeFall() end)
only works once, prints everytime the event is fired tho :/
|
|
|
| Report Abuse |
|
|
|
| 23 Dec 2016 08:30 PM |
where's the script that waits for the event to be called?
Post it. |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 23 Dec 2016 08:38 PM |
its being called. that aint the problem cause it prints again even when it doesn't show the animation
game.ReplicatedStorage.Events.Block:FireServer()
|
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 23 Dec 2016 08:41 PM |
its just the normal animation script
function playToolAnimation(animName, transitionTime, humanoid) if (animName ~= toolAnimName) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end
local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]") local anim = animTable[animName][idx].anim
-- load it to the humanoid; get AnimationTrack toolOldAnimTrack = toolAnimTrack toolAnimTrack = humanoid:LoadAnimation(anim) -- play the animation toolAnimTrack:Play(transitionTime) toolAnimName = animName
currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc) end end
function stopToolAnimations() local oldAnim = toolAnimName
if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:disconnect() end
toolAnimName = "" if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end
return oldAnim end
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0 then playAnimation("walk", 0.1, Humanoid) pose = "Running" else playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end
function onDied() pose = "Dead" end
function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end
function onClimbing() playAnimation("climb", 0.1, Humanoid) pose = "Climbing" end
function onGettingUp() pose = "GettingUp" end
function onFreeFall() playAnimation("fall", fallTransitionTime, Humanoid) pose = "FreeFall" end
function onFallingDown() pose = "FallingDown" end
function onSeated() pose = "Seated" end
function onPlatformStanding() pose = "PlatformStanding" end
function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end
|
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 23 Dec 2016 08:41 PM |
| all i did was add the fire server event and changed the id |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 23 Dec 2016 08:42 PM |
| https://www.roblox.com/item.aspx?id=584652448 |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Dec 2016 02:21 AM |
Stop all animations in the char at the beginning of your function and then play the desired one(s)
|
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 24 Dec 2016 02:31 AM |
| whats the script for that ;/ |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Dec 2016 02:39 AM |
http://wiki.roblox.com/index.php?title=API:Class/Humanoid/GetPlayingAnimationTracks
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 24 Dec 2016 02:40 AM |
http://wiki.roblox.com/index.php?title=API:Class/AnimationController/GetPlayingAnimationTracks
|
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 24 Dec 2016 02:46 AM |
so i put it in the animate script?
i disabled and re enabled still dint work |
|
|
| Report Abuse |
|
|
|
| 24 Dec 2016 03:22 AM |
@OP You do know how to script right?? |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 24 Dec 2016 03:47 AM |
still only plays once
game.ReplicatedStorage.Events.Block.OnServerEvent:connect(function() -- Npc Block onFreeFall() script.Parent:WaitForChild("AnimationController") for i,v in pairs(script.Parent.AnimationController:GetPlayingAnimationTracks()) do v:Stop() end end)
learning lol |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 24 Dec 2016 03:23 PM |
| Other than "it doesn't work" why can't you use the Humanoid event? Are there any errors on client or server for the event or your approach? |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
|
| 24 Dec 2016 03:41 PM |
i did..and no
justplays one gave u the script |
|
|
| Report Abuse |
|
|
GreedTaka
|
  |
| Joined: 12 Dec 2014 |
| Total Posts: 1503 |
|
| |
|