Hello does anyone know how to fix the lavadamage script from the Jurassic World Volcano Challenge event ages ago curious as wanna re-open the game with new updates (just to be clear this script is from Jurassic World Volcano Challenge event ages ago)
Edit: it work in studios but not in game confused
forgot to say this script is in ( ServerScriptService )
-- Amount of damage players will take when standing in lava
local LAVA_DPS = 300
-- Roblox Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
-- Tables to keep track of which characters are on fire
local charactersOnFire = {}
local signalBindings = {}
-- Create and configure the fire
local function createFire()
local fire = Instance.new("Fire")
fire.Enabled = false
fire.Size = 10
return fire
end
-- Called when a new character model is created
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local floorChangedSignal = humanoid:GetPropertyChangedSignal("FloorMaterial")
-- Create fire effect to show the player if they are taking damage
local fire = createFire()
fire.Parent = humanoidRootPart
-- Connects function to when the floor under the character changes
signalBindings[character] = floorChangedSignal:Connect(function()
-- If the character is standing on lava, add them to the list of on fire
-- characters and turn on the fire effect. Otherwise to the opposite
if humanoid.FloorMaterial == Enum.Material.CrackedLava then
charactersOnFire[character] = true
fire.Enabled = true
else
charactersOnFire[character] = nil
fire.Enabled = false
end
end)
end
-- Clean up the event connections when a character model is removed
local function onCharacterRemoving(character)
if signalBindings[character] then
signalBindings[character]:Disconnect()
end
if charactersOnFire[character] then
charactersOnFire[character] = nil
end
end
-- Set up character event binding when player joins the game
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterAdded)
player.CharacterRemoving:Connect(onCharacterRemoving)
end
-- Game update loop
local function onHeartbeat(delta)
local damage = LAVA_DPS * delta
-- Go through all of the characters on fire and make them take damage
for character in pairs(charactersOnFire) do
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid:TakeDamage(damage)
end
end
end
-- Connect functions to events
Players.PlayerAdded:Connect(onPlayerAdded)
RunService.Heartbeat:Connect(onHeartbeat)

4 comments
i read it and i dont see whats wrong with it. Im going to try this script in studio and see what happens ingame.
it work in studios but not in game confused to why it's not working but thanks for letting me know you don't see anythink wrong with it as that's good to know
Alright It also doesnt work ingame for me. Im gonna look at this some more and see if i can fix it.
Thank you so much AlexanderYar just hoping it can be fixed as wanna re-open the game with new updates just that one script that doesn't work sadly but thank you so much it really does mean alot to me that you're gonna see if you can fix it so thank you.