Untitled
Anonymous
Plain Text
02/18/2026 7:41 PM
934 B
11
Indexable
Never
local lava = script.Parent
local riseSpeed = 0.05 -- How fast the lava rises (adjust this!)
local damageAmount = 10 -- How much health the player loses per touch
-- Function to damage players when they touch the lava
local function onTouched(otherPart)
local character = otherPart.Parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid:TakeDamage(damageAmount)
end
end
lava.Touched:Connect(onTouched)
-- Loop to make the lava rise slowly
while true do
lava.Position = lava.Position + Vector3.new(0, riseSpeed, 0)
task.wait(0.1) -- Wait a short time before rising again
end
Editor is loading...
Leave a Comment