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

What should I learn for Magic, like Fairytail, lightning, elements?

Asked by 7 years ago

hello! I started scripting just three days ago, and I was wondering what I should learn to be able to make magic. By magic I mean like Fairytail magic, lightning bolts, elemental things, teleporting, etc. I do not know where to start when making these kind of things... May someone please help me? What should I learn? :3 Thank you so much for your help! :smile: OH ALSO, what is return and how do I use it?

Hopefully this question wont be taken down because of the "Category". Lol

1 answer

Log in to vote
2
Answered by 7 years ago

Hello

Im not really that good at scripting but i hope this helps.

The first things are variables,pretty much texts that store some type of value,for this script we might need to make some variables..

repeat wait() until game.Players.LocalPlayer --i do this because an error would appear.
local Player = game.Players.LocalPlayer
local Char = Player.Character
local Mouse = Player:GetMouse()

So i guess your making a magic,right? well,if you are going to make a projectile,you will need to know how to create a part.

local Flare = Instance.new("Part")
Flare.Parent = game.Workspace

easy,right? Well,in order to make it move,we will have to give it some velocity,so..

local BV = Instance.new("BodyVelocity")
BV.Parent = Flare
BV.Velocity = Mouse.Hit.lookVector * 60 -- this is the direction & speed of the projectile
BV.MaxForce = Vector3.new(1e8,1e8,1e8)

And,to finish it off you might need to add some projectiles to the flare,so you can simply put some in a folder,clone them,and put them in the flare.

local Particle = script.Parent.Folder --if its going to be on a folder..
Particle.Parent = Flare -- placing it on the flare.

so,that should get you started.

Variables are important Learning functions to make things shorter is also helpful. Learning loops can be useful for making explosions,by resizing a Sphere mesh,for example.

local Mesh = Instance.new("SpecialMesh")
Mesh.MeshType = "Sphere"

for i = 0,32 do --this will resize the Sphere mesh over time,making an explosion-like effect.
    Mesh.Scale = Mesh.Scale + Vector3.new(1,1,1)
    wait()
end

Learning evens is also helpful,for example..

Mouse.KeyDown:connect(function(key)
    if key == "q" then
        --Your code here.
    end
end)

This will help making the keys for the moves.

I really hope this helped.

0
WOW! Thank you so much for this! I can't believe that you gave me this much help! I will definitely keep practicing, only think I need to study in this answer is the Velocity, Maxforce, etc, but tysm for ur time! iizWishzii 21 — 7y
0
Np kristibezatlliu1111 33 — 7y
0
UPDATE: KeyDown/KeyUp is Deceprated (or however you spell) so you shouldn't use it anymore kristibezatlliu1111 33 — 7y
0
what do you mean you are bad at scripting, you saved my life, or at least my game PhoenixVortex_RBLX 33 — 7y
0
ok :v kristibezatlliu1111 33 — 7y
Ad

Answer this question