How would I script something like this?

Boo! I’ve decided I wanted to make a game like this i.e re-creating something I LITERALLY know how to use, but can’t do? Get it? Probably not LOL! So these are like, spells that you could call it, the first 2 that I show do work, this is from another game to clarify, but it wouldn’t “boundary” the circle due to myself being the spell caster, anywho you get the point:

Videos:


(In what I’m looking for, is what would I need to learn to use, how to format / function it)


Thanks!

I don’t get what you’re trying to do. What do you want to do.

1 Like

Are you trying to detect a specific distance between 2 points? (Or checking if the Player is within the boundary of the circle) If that’s the case, you can just simply use Magnitude to check both the Character’s HumanoidRootPart Position & the Circle Position and see if it’s less than the other to properly cast the spell

1 Like

Create something i.e like the videos provided above, if you need better explaination here you go,

I wanted to create something based of a pretty-famous show & it has magic inside of it, and I wanted to manipulate scripting to re-create spells, but I’m not sure how to get them working. For example the videos above were, boundary spells, vis sera portus being the locking it, and apne en vrata unlocking it. Think it as a door.

What I am trying to do is get enough knowledge to make that + more, I want to be able to function a whole spell / magic game that people can enjoy, hope that explained it.

In saying that would be how to format, function the scripts + learn how to manipulate that

1 Like

Are you trying to make a circle that people cant go into until someone opens it? – can you be direct.

Not just that, I was saying that as an example, I wanted to make a magic system, that people can use spells against their opponent, objects. In-saying that would require knowledge that I probably know I just need reminding / taught of.

But what you said wasn’t the point of the videos, the video showed that the spell Vis sera portus locked the circle, preventing anyone BUT the caster, into it. Then apne en vrata unlocked it, I hope that makes more sense.

This is a very broad question–there are many ways to set up a system like this.

Personally I would set up the system so that it would be modular and that a player would request a magic type and a magic spell from that magic type to be casted–then I would look inside a set of modules for that magic type and then that magic spell.

image

Here is a post that does something similar.

1 Like

Unfortunately this doesn’t provide my question, what I am asking for the point of this is, what I would need to learn to manipulate this and use it inside my game.

You want to know what you need to know to make a magic system?

Yes, exactly what I was looking for!

I don’t think there is much you need to know? Just know how to write Lua and know how to change properties of parts.

Maybe learn how to use OOP and module scripts? It would probably be best if you just started to make the magic system and then when you don’t know how to do something you learn it.

Back in ~2015-2016 I made a simple caster by just using Tool.Activated and spawning a part with a BodyVelocity and when it would touch something I would just make an effect happen.

1 Like
local lock = workspace.Lock -- make a lock that is a transparent part that basically has cancollide set to false(for now).
local weretoteleportto = workspace.In -- basically the surface of the circle

 game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if msg == "Vis sera portus" then
lock.CanCollide = true
lock.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChildWhichIsA("Humanoid")
if hum then
if hum.Parent.Name == player.Name then
hum.Parent.HumanoidRootPart.Position = weretoteleportto.Position
else
print("This person doesn't have access..")
end
end
end)
elseif msg == "apen en vrata" then
lock.CanCollide = false
end
end
end)
end)
1 Like

Hey sorry for bumping this / re-starting this but…

game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(msg)
		if msg == "Incendios" then
			for i, v in pairs(game.Workspace.Table1:GetChildren()) do
				if v.Name == "candle1" then
					print("tes")
					v.Effects:GetChildren().Enabled = true
				elseif v.Name == "candle2" then
					v.Effects:GetChildren().Enabled = true
				end
			end
		end
	end)
end)

I created that, it prints but doesn’t enable the effects inside the candle?

EDIT: FIXED IT

Wait, so did my script work?

LIMIT

1 Like

Indeed, thank you! :slight_smile:

1 Like