HELP - On my entity Blaze

I am trying to create a entity that dashes through the middle of the map and there are sides that are safe as I want it to be in the same Y pos as the player and because the player goes deeper in this rng generated map. Can someone help.

local Players  = game:GetService("Players")
local Rep = game:GetService("ReplicatedStorage")
local Blaze = Rep.Blaze
local BlazeP = Blaze["Blaze Part"]  
local SafePart = Blaze.SafePart
local SafePart1 = Blaze.SafePart1

function SpawnBlaze(player)
	local character = player.Character
	if not character then return end
	
	local hrp = character:FindFirstChild("HumanoidRootPart")
	if not hrp then return end
	
	workspace.Warnings["Blaze - Warning"]:Play()
	
	local playerY = hrp.Position.Y
	

	local BlazeClone = BlazeP:Clone()
	BlazeClone.Position = Vector3.new(0, playerY, 0)
	
	local SafePClone = SafePart:Clone()
	SafePClone.Parent = workspace
	SafePClone.Position = Vector3.new(0, playerY, 0)
	
	local SafePClone1 = SafePart1:Clone()
	SafePClone1.Parent = workspace
	SafePClone1.Position = Vector3.new(0, playerY, 0)

	task.wait(4.5)
	BlazeClone.Parent = workspace
	
	BlazeClone.Touched:Connect(function(hit)
		local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
		if humanoid and humanoid.Health > 0 then
			humanoid.Health = 0
		end
	end)
end

--while true do
--	wait(math.random(45, 145))
--	for i, player in pairs(Players:GetPlayers()) do --SYSTEM - WHEN WORKING!
--		SpawnBlaze(player)
--	end
--end

for i, player in pairs(Players:GetPlayers()) do
	SpawnBlaze(player)
end
	

Audio Url : Blaze - Warning - Creator Store

If you want more details just ask!

I have a couple questions.

  1. What isn’t working exactly?
  2. Why have u created safe parts if they don’t do anything?

It doesn’t run I don’t really know I will look more into it later… I will reply soon

So the player can see the and where to go before the blaze part shows and kills them!

2 Likes

Yes, but the safe parts don’t determine where the player is safe in the script. It is possible to be outside the safe zone and not die, or be inside and die, because it relies on .Touched

Whats in the output? Any errors? Also, pairs() are not needed.

Well it spawns in the middle of the 50X50 stud map and the saff parts are around 10 studs each on either side.. But gtg

2 Likes

Check the output when ur not busy, and change the char line to char = plr.Character or plr.CharacterAdded:Wait() Send me a pic of output when u can.

I am confused there are no output comments so does it not run?

no, as in can you open the output tab, then run the game, and take a picture of what it says

No sorry there are no related comments to the script! It does comment stuff but that’s other stuff!

Hi, im not talking about comments, im talking about this thing called the output. Do yk where print stuff shows? That thing. If theres something wrong then there will be an error. Can u send a pic?

Sorry yes there are nothing related in the output sorry I thought they were called comments!

thats ok! No errors at all? Ill look over the script again.

Did you do the character line i said? If not then try adding it

Also there isn’t any movement here, is that intended? I think it is spawning but at (0, playerY, 0) so that if the player is at (100, 5, 100) then it will spawn 100 blocks away

Yes I did!

No there isn’t meant to be movement it’s just so its at the player Y POS!

1 Like

hmmm thats weird. Can you send a pic of output just to make sure as im not sure why they’re not spawning.

Sure thing doing so now :slight_smile:

1 Like

Here is the picture:

1 Like

that is so odd, i cant see the problem. Anyone else know? Actually when you run it can you look in workspace and see if they’re there?

Looks like danger and both safe areas are stacked in the center.

1 Like