Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a Freezing/Burning Block?

I am trying to search around but to my luck no avail there is not any (at least one that works) a script or a video of some kind to tell me how to make a freezing block and a burning block. Now what do I mean by this well here is what I mean.

What I mean by freezing is I want the character to look frozen with the image of like an iceburg surrounding them (I hope that is possible) once it touches them I want it to kill that character pretty much instantly.

Pretty much same thing with the burning one I want the character to set on fire by touching the brick and die almost instantly.

I hope this isn't too confusing but I would very much appreciate it if someone could help. Thank you in advance!

So now I have added an almost working freezing brick script but it still is not complete the problem with it is that it only kills the player once and then it won't kill the player again. Then I still do not know how to add in the effect of turning the player into a ice, like your becoming frozen, right before they die.

Freezing Script that needs to be worked on:

deb = false
debris = game:GetService("Debris")

script.Parent.Touched:connect(function(part)
	if not deb then
		deb = true
		
		if part.Parent then
			if part.Parent:FindFirstChild("Humanoid") then
				local hum = part.Parent:FindFirstChild("Humanoid")
				hum:TakeDamage(100)
				
				local ice = Instance.new("Part",game.Workspace)
				ice.Anchored = true
				ice.CanCollide = false
				ice.Size = Vector3.new(6,7,3)
				ice.Position = part.Parent:FindFirstChild("Torso").Position
				ice.Transparency = 0.5
				ice.Material = "Ice"
				ice.TopSurface = 0
				ice.BottomSurface = 0				
				
				debris:AddItem(ice,5)
			end
		end
		wait(1)
		deb = false
	end
end)

1 comment

0

for the fire one use the fire instance and use hit function

2 answers

✓ Accepted answer

I can help you with the fire one.

function onTouch(part)
	local plr = game.Players:GetPlayerFromCharacter(part.Parent) 
	local Character = plr.Character
	local Fire = Instance.new("Fire"):Clone()
	local interval = 1 -- Interval of every health lower.
	Fire.Heat = 9 -- Heat of the Fire instance.
	Fire.Size = 5 -- Size of the Fire instance.
	Fire.Parent = Character.Head -- You can change where to put the fire (Torso, Left Arm..)
	
while true do
	wait(interval)
	Character.Humanoid.Health = Character.Humanoid.Health -5 -- Health lower every interval
   end
end

script.Parent.Touched:connect(onTouch)

So now I have added an almost working freezing brick script but it still is not complete the problem with it is that it only kills the player once and then it won't kill the player again. Then I still do not know how to add in the effect of turning the player into a ice, like your becoming frozen, right before they die.

This discussion is preserved as it was. New answers, comments, and votes are closed.