Need help with protecting spell;

Greetings, I’m having issues scripting this spell where it requires 3 spell casters (players) to type the spell; “Bulla” when the spell is sent in chat with all three witches / wizards press on each others characters, they are then presented with a shield around them all.

Other players when they come up to them, and try go through the shield and they are not apart of that ritual / spell at the start get flinged.

I have tried various times to search it up, but I am not sure how to get around it.

Any suggestions / tutorial / help provided will be credited through the game.

Many thanks,
saouvs

1 Like

Great idea! But I don’t get about clicking every player on each other… It can be complicated because others can click on them. I’ll ignore that.

Shield can be a half of sphere. Well, there are 2 ways:

  • It’s actually a half of sphere

  • Make it in blender, but anyways-

-it will be only visually, because actually, you need a sphere where half will be underground and half above ground.

Players inside should play animation as if they hold it, well, it’s your choice, but try to anchor them and turn humanoid PlatformStand to true. I’m not because sphere will be anchored, it so players MUST NOT be affected by physics or else they will be glitched inside it

Don’t forget to create a table, which will contain “whitelisted people” (actually, only who are inside)

More about tables:

Script will check if player which touches shield is in table/whitelist. If he isn’t (obviously he won’t be there.

If he will, then script detected one of those players inside the sphere, it means that they WERE affected by physics and touched it == redo non-moving system. I’m also not sure about changing humanoid’s state to none (no physics)

So, if player wasn’t found in table, then he gets flinger. More about it in my last post hehe:

1 Like

I have made the shield already, I’m wondering about the script remainder (In meaning this I meant that is that the whole script I need or half of it?)

Current script I have:


local bullamod = game.Workspace.MeshPart
local rs = game.ReplicatedStorage
local bullaevent = rs.BullaFire
local spell = "bulla"

function onChatted(msg)
	local source = string.lower()
	msg = string.lower(msg)
	if (msg == spell) then
		bullamod.Transparency = 0
		bullamod.Position = game.Players.LocalPlayer.Position
		bullamod.Orientation = game.Players.LocalPlayer.Orientation
		wait(15.5)
		bullamod.Transparency = 1
	end
end


function onTouch(hit)
	if not hit.Parent:findFirstChild("Humanoid") then return end
	if hit.Parent:findFirstChild("ForceField") then return end
	local ff = hit.HumanoidRoot.Health == 1000000
	script.Parent.Part.TouchEnded:connect(function()
		if hit.Parent:findFirstChild("ForceField") then
			ff.Health = 100
		end
	end)
end

script.Parent.Part.Touched:connect(onTouch)

Well, as I mentioned before, it’s complicated about 3 spell casters, I think it would be easier, if you make a GUI where you can choose them from server leaderboard.

Clicking as standart ClickDetector can be clicked by every player, as I know, and that’s the problem. I’d recomend you to make it that they should use Bulla at the same time (max delay can be 5-10 seconds for example). To find out about that watch some videos about how to make magic. There you will see the local side (Pressing the key) => sends a signal to server (Shield appears)

Flinging should be in shield.

Looking on your script, I assume that it’s local side:

But then shield’s transparency won’t change for other players. I highly recomend moving that part to server side and get players from RemoteEvents (vid which I sent)

Same about last part (which I didn’t get, tbh. Because character hits shield then he must be outside of it, but you change his health to 1000000)