Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Where should i insert a animation?

Asked by 8 years ago
local ManaNeeded = 100 --Change these values around
        local vec = Vector3.new(mouse.Hit.X,mouse.Hit.Y,mouse.Hit.Z)
        if gui.Mana.Value >= ManaNeeded then
            if not firedb then
                firedb = true
            gui.Mana.Value = gui.Mana.Value - ManaNeeded
            local fb = p.Parts.Fireball:Clone()
            fb.Position = plr.Character.PrimaryPart.Position + ((vec - plr.Character.Head.Position).unit * 5)
            fb.Velocity = (vec - plr.Character.Head.Position).unit*200
            fb.Name = (plr.Name..'Fireball')
            fb.Parent = plr.Character
            fb.Script.Disabled = false          
            fb.Position = plr.Character.PrimaryPart.Position
                wait(5)
                firedb = false
            end
        return true
        else
        return false
        end
    end,

i just need to know where to insert an animation in here cause I want the animation to play when you fire

0
you can do "local vec = mouse.Hit.p", easier to write QuantumToast 261 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

If this is for a character then simply placing the animation object into starterPlayer->StarterCharacterScripts will be copied into the characters model every time which can then be used by scripts.

Hope this helps

Ad
Log in to vote
0
Answered by 8 years ago

Maybe the torso, Yet again I'm not sure

Answer this question