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

How to smoothly change the value of fogend so it doesn't just jump right to the fog density?

Hello again. Sorry for asking 2 questions so quickly but this should be the last one for a while. Here I have this script. It increases the fog density whenever an event happens. The problem is; I don't know how to smoothly transition to the right fog value without creating a bunch of lines changing it one by one. So it ends up looking quick and ugly. Is there a way to do this without writing so many lines?

RemoteEvent.OnClientEvent:Connect(function(vamp)
	if vamp ~= localplayer then
		if localplayer.Character.charactervalues.Role.Value ~= "Vampire" then
			print("nightfaller")
			a.FogEnd = 25
			wait(0.1)
			a.FogEnd = 100
			wait(10)
			localplayer.PlayerGui.Nightfall.Sound:Play()
			localplayer.PlayerGui.Nightfall.Frame.Visible = true
			a.FogEnd = 25
			wait(83.5)
			a.FogEnd = 100
			localplayer.PlayerGui.Nightfall.Frame.Visible = false
			wait(5)
			localplayer.PlayerGui.Nightfall.Sound:Stop()
		end
		end

1 answer

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