I want this script to tween the volume, and fog when the player reaches 1 health.
Server Script -
game.ReplicatedStorage.Death.OnServerEvent:Connect(function(player)
local tweenser = game:GetService("TweenService")
local goal = {}
goal.PlaybackVolume = 0
local e = TweenInfo.new(2)
local tw = tweenser:Create(game.Workspace["Insanity Sans (Shifty Edition)"],e,goal)
tw:Play()
for i,v in pairs(game.Lighting:GetChildren()) do
v:Destroy()
end
wait(4)
local goal2 = {}
goal2.FogStart = 22
goal2.FogEnd = 22
local ee = TweenInfo.new(6)
local tww = tweenser:Create(script.Parent,e,goal)
tww:Play()
end)
Local Script -
local char = game.Players.LocalPlayer.Character:WaitForChild('Humanoid')
if char.Health <5 then
game.ReplicatedStorage.Death:FireServer()
wait(9)
game.Players.LocalPlayer:Kick('heheheh, it was comming to ya.')
end