How should I begin in animating and scripting magic. I’ve looked at free models but they don’t make much sense to me… especially the scripts. I have a pretty good understanding of math up to calculus and I understand physics to some extent. So, how would I script and animate magic? Is there like a step by step process or something that does it? I’ve also looked on youtube but haven’t found much that’s helpful to me.
It’s unclear what you’re trying to do. Can you give more info about what you want to achieve?
I’m basically just looking to create cool magics. To start, I basically want to learn how to create a fireball or something, then move on to some more complex stuff.
A good magician never gives away his secrets.
Good thing I’m not a magician.
But in all seriousness, I’m not 100% sure what you’re trying to achieve, but I can tell you particles and beams play a big role in good magic. Lots of cool particles.
Haha. So, I’m gonna be straight forward… I basically want to create a game of magics where you get magic and you just use it to train it and get stronger with it. Currently, I can’t create magic, so I’m trying to figure out how.
It’s best you learn the basics of scripting before attempting complexity, otherwise you’ll end up disgruntled and never want to try again. I’d start with Client-Server Runtime | Documentation - Roblox Creator Hub so you can get the hang of how replication works, then move on to scripting physics (bodyforce, vector placement etc) CFrames | Documentation - Roblox Creator Hub. Feel free to ask questions inside #development-support:scripting-support should you ever need it, but don’t expect to be spoon-fed.
Ok thanks. I don’t want to be spoon fed code… I just want to know the process.
I gotcha, it’s just a lot of people that post in there expect it.
This is probably one of the weirdest titles i’ve ever seen on this devform, but as @LordMerc said you will need to be able to understand coding. In my opinion it’s usually easier to start with Python if you have time, but if your short on time you can just learn it directly.
I know some of the basics of scripting… I’ve been scripting for a month or two.
Perhaps this thread would be of help? Most efficient way to create spellcasting system? - #3 by madattak Otherwise your question really amounts to ‘How do I make a game’, and we cant really answer that for you.
Okay then you could try doing more advanced stuff like sending requests or plan a way to do what your trying to achieve
What exactly would that entail…
This is way too broad.
By taking this definition at face value which is all I have to work with, you could consider things such as teleporting magic. The thing about magic is it isn’t just a single thing. Every spell in take Harry Potter for example has a different purpose (Removing Wands, Stunning People, Shooting Fire, Making Snakes Appear.)
It would obviously be ridiculous for us to tell you the process for making each individual one, as the process isn’t the same. You wouldn’t go around scripting a stun spell in the same way as a disarming one.
We also have no idea how you want these spells to be cast. From a tool ? When they click a button or a mouse key?
I suggest you make this post way more detailed, and at least narrow it down to two or three specific things instead of “Scripting Magic.” Or instead of asking how to script magic ask questions such as how can I target an individual player, or do something when a button is clicked.
Ok… I’m gonna give a basic scenario so you know what I mean. So, I have a test place where I just put stuff down as I need to so I can learn. So, the magic is gonna be a tool to start because I don’t really know how to attach it to a keybind. But later, I’ll probably make it attached to a keybind. And the magic I want to basically cast is for now… a fireball. A ball of red flames or something that goes in a specific direction. I’m currently learning about the Roblox Client-Server Model and CFrames. I have a decent understanding of OOP in other languages like JS.
You’ll be able to progress with the physics link I sent, as it entails how to enact physics on objects via script.
Thank you so much!! That will help me a lot. It’s the CFrame link right?
First you can start by making an easy fireball to do you need to add a local script to the StarterCharacterScripts and name it FireBallScript(If you want) then past this in it:
Local script
–//Services\–
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local UserInputService = game:GetService(“UserInputService”)
– Variables----
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local Remote = ReplicatedStorage.Fireballevent
local Mouse = player:GetMouse()
–//Settings\–
local Debounce = true
local Key = ‘Q’
UserInputService.InputBegan:Connect(function(Input , IsTyping)
if IsTyping then return end
local KeyPressed = Input.KeyCode
if KeyPressed == Enum.KeyCode[Key] and Debounce and Character then
Debounce = false
Remote:FireServer(Mouse.Hit)
wait(1)
Debounce = true
end
end)
This script will Make a Event in the ReplicatedStorege Run (Make sure to add one and name it Fireballevent only capital F) after that make a script in ServerScriptService Named whatever you want then paste this into it:
Script in ServerScriptService
–//Services\–
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
– Variables----
local Remote = ReplicatedStorage.Fireballevent
–//Settings\–
local Damage = 20
Remote.OnServerEvent:Connect(function(plr, Mouse)
local Character = plr.Character or plr.CharacterAdded:Wait()
local Part = Instance.new("Part")
Part.Shape = Enum.PartType.Ball
Part.Anchored = false
Part.CanCollide = false
Part.Transparency = 0.5
Part.Color = Color3.fromRGB(255,0,0)
Part.Material = Enum.Material.Neon
Part.Size = Vector3.new(3,3,3)
Part.Name = "FireBall"
Part.CFrame = Character.HumanoidRootPart.CFrame
Part.Parent = workspace
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
BodyVelocity.Velocity = Mouse.lookVector*100
BodyVelocity.Parent = Part
local Debounce = true
Part.Touched:Connect(function(h)
if h.Parent:FindFirstChild("Humanoid")and h.Parent.Name ~= plr.Name and Debounce then
Debounce = false
local Enemy = h.Parent.Humanoid
Enemy:TakeDamage(Damage)
Part:Destroy()
wait(1)
Debounce = true
end
end)
end)
What this does is makes a part ball shaped and colors it you can change colors and the damage so basically what this script does is make a part and sends it if it hits someone it damages him the amount of damage you put to increase or decrease the speed you go to the Mouse.lookVecotor*100 part and change 100 to whatever you want and that will be the speed of your fireball.
Hopefully this helped you if there are any questions feel free to ask me.