How can I make a wand that uses chat spells?

Hey! I have been trying to make a magic game where you hold a wand, say a spell and the spell that you said shoots from the tip of your wand to where your mouse is at. Here is some examples:
https://www.roblox.com/games/527730528/Magic-Training

They have extremely neat spells and I don’t get how they do it. Just to let you know I am not the most advanced scripter so I might not understand everything you say. I want my spell to have a zig-zag look to it like in Magic Training. Another problem is I don’t really know where to start.

Welp, thanks for reading my thread, reply if you can and yeah, Bye!

10 Likes

Try this link. Very helpful for making chat commands, and you can use a while true do function to tell if they are holding the wand

1 Like

oh, you want to make the actual commands, well, there are plenty of tutorials out there, i just don’t know the specific names. I saw a community tutorial a few days ago about making rays with a pistol, and you can just search the general words, and try to modify the script he uses

1 Like

You should learn basic weapon system programming before you get into a game like this. Each spell would require it’s own function or module, and would need a ton of backend code.

3 Likes

Well, I have made one before but it is just extremely boring. The spells are just spheres and the wand looks bad and the script isn’t great, so I thought I would just start all over again.

1 Like

Ok. Well, if you want to do advanced spells, I would try these services and instances to improve the look:

  • TweenService
  • DebrisService
  • ParticleEmitter
  • Beam
  • Trail

Hopefully I helped? If not, is there something more specific you are looking for?

3 Likes

@iGalaxyWorld So, I speciallize in the creation of such systems, and what version you might want to start looking at, is a very basic version. I can make very basic system for you, just so you get the feel, because all wands that are made in the HP(Harry Potter) genre follow the same configuration. Local spell recognition to load the spell, then a remotes fired if the spell is loaded when the mousebutton1 is clicked, and then the remote fires a fuction that creates a projectile and cframes it in loops in the direction of the endPosition(Mouse.Hit) from the startPosition(Wand tip). Raycasting is used in the loop to detect hit. It is not too difficult when you get used to it, but you will need to be familiar with raycasting and remotes. As far as the zig zag goes, that is in the maths of the cframe. In order to make it a projectile you generate a random position based off of the “Zig zag amount value” and then send the projectile in this loop.
I have some examples of very simple versions of this
Game with wand projectile example:

gif examples:
https://gyazo.com/b62ad1228033e260a81d28e93eb2f91d
https://gyazo.com/df8998864320676306ed40c41c818971

Also, trails are used for the traveling effect on the projectile or parts if you want an actual and fully raycasted effect

3 Likes

Hello, Those wands look amazing! I have figured out how to make the wand, but I just haven’t got the really cool spell effect. Could you tell me how you make the spell itself?

1 Like

Now this is not exactly what you need, but you can adapt it to work with your game. There is a guide on admin commands where you can learn to make your own admin commands. Now, you could just adapt it by replacing some of the code such as the IsAdmin() function with nothing, or you could add something where you have to check if the player has enough “Magic” or something like that before running the command. Then you just trigger a function for each command/spell and it acts as if you are casting a spell.

Here is the tutorial on that if your interested: How to make basic admin commands

1 Like

@iGalaxyWorld All you would need now is just some good particles, and a trail. The wands I showed u uses two trails to give that “lightning” effect. You just gotta play around with it. Some games like wizard life uses trails with a special texture. So you just play around until you find something you like.

1 Like

Could you maybe lend me the particles so I can experiment with them? I won’t use them in my game, ill just make my own after I finish experimenting.

if you’re still tryna make these i can get serphos (the maker of magic training) to dm you, he’s always willing to help people script

2 Likes

I have managed to make my own wands already! Thanks for the help anyways :smiley:

1 Like

Oh I don’t know this script. So I don’t know how to make the magic wand.

I know it’s a bit late, but is that still possible? I need help to make my wand