This is the script in workspace:
local lava = workspace.Lava
local sound = game.Workspace.Sound
sound:Play()
while true do
local j = sound.PlaybackLoudness/30
if sound.TimePosition > 1 then
lava.Size = Vector3.new(lava.Size.X, j, lava.Size.Z)
lava.LavaOn.Value = true
wait()
end
wait()
end

2 comments
Is this script being run server sided cause if so I don't think server scripts can view the playback loudness of a sound. Run the second part via a local script that detects when the sound starts playing.
Nevermind, got it after asking around on a disc, I solved it by firing a remote with the data, thanks for trying!