Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.PlayAnim = function(id, time, speed)
- local Players = game:GetService("Players")
- local plr = Players.LocalPlayer
- -- i used these scripts from System Broken so dont hate pls im still learning lua scripting on solo
- pcall(function()
- plr.Character.Animate.Disabled = false
- local hum = plr.Character.Humanoid
- local animtrack = hum:GetPlayingAnimationTracks()
- for i, track in pairs(animtrack) do
- track:Stop()
- end
- plr.Character.Animate.Disabled = true
- local Anim = Instance.new("Animation")
- Anim.AnimationId = "rbxassetid://"..id
- local loadanim = hum:LoadAnimation(Anim)
- loadanim:Play()
- loadanim.TimePosition = time
- loadanim:AdjustSpeed(speed)
- loadanim.Stopped:Connect(function()
- plr.Character.Animate.Disabled = false
- for i, track in pairs(animtrack) do
- track:Stop()
- end
- end)
- end)
- end
- -- PlayAnim(id, time, speed)
- -- _G.PlayAnim(10714360343, 4, 0)
- --[[
- dragged anim "10714360343"
- Superman freezed idle anim "10714347256"
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement