Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Where should i insert a animation?

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

1 comment

0

you can do "local vec = mouse.Hit.p", easier to write

2 answers

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

This discussion is preserved as it was. New answers, comments, and votes are closed.