Need help removing flash bang effect from gui text

The text itself was never bright to begin with. The problem is that my textstroke is causing this weird effect as you can see in the video I posted.

  1. The stroke is covering the entire txt, instead of only the edges.
  2. The stroke is instantly turning 100% non transparent.

The tween service is cool though, even though it doesn’t solve it.

This is what the Script should do:


it shouldn’t cause a “Flashbang” effect

It gives the same effect that my original script gives.
And yes I know it shouldn’t cause a flashbang effect - that is why I am posting on DevForum.

But why are you arguing then???

I’m not arguing. I am simply explaining that the problem is displayed on the original video that I posted. The stroke is behaving weirdly.

Can you show your whole script then? there may be something interfering with it


-- variables

local camCheck = false

local cc = workspace.CurrentCamera

local plr = game.Players.LocalPlayer.Character

local mc = workspace.menuCam

local playB = game.Players.LocalPlayer.PlayerGui.Menu.playB

local settingsB = game.Players.LocalPlayer.PlayerGui.Menu.settingsB

cc.CameraType = Enum.CameraType.Scriptable

cc.CFrame = mc.CFrame

-- functions

local function playClick()
	
	local startVol = game.SoundService.menuMusic.Volume
	
	local darken = script.Parent.Parent.Parent.darkener.darken
	
	game.Players.LocalPlayer.PlayerGui.Menu.Enabled = false
	
	local userInputService = game:GetService("UserInputService")
	
	local guideTxt = game.Players.LocalPlayer.PlayerGui.guide1.text

	userInputService.MouseIconEnabled = false
	
	while darken.Transparency >= 0 do
		wait(0.01)
		darken.Transparency -= 0.02
		game.SoundService.menuMusic.Volume -= (startVol/100)*2
	end
	
	--gameplay settings
	plr.Humanoid:RemoveAccessories()
	game.Lighting.Atmosphere.Density = 0.9
	game.Lighting.Brightness = 0.5
	plr:MoveTo(workspace.startBlock.Position)
	camCheck = true
	wait(0.1)
	game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
	wait(0.5)
	game.SoundService.wind.Playing = true
	
	--enable scripts
	game.Players.LocalPlayer.PlayerScripts.ambience1.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience2.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience3.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience4.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.flashlight.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.walkSounds.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.sprint.Disabled = false
	
	while darken.Transparency <= 1 do
		wait(0.01)
		darken.Transparency += 0.02
	end	
	
	
	local TS = game:GetService("TweenService")

	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 0, TextStrokeTransparency = 0}):Play()
		task.wait(5)
	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
	end

--	while guideTxt.TextTransparency > 0 do
--		wait(0.01)
--		guideTxt.TextTransparency -= 0.02
--		guideTxt.TextStrokeTransparency -= 0.02
--	end
	
--	wait(5)
--	while guideTxt.TextTransparency < 1 do
--		wait(0.01)
--		guideTxt.TextTransparency += 0.02
--		guideTxt.TextStrokeTransparency += 0.02


playB.MouseButton1Click:Connect(playClick)

Not sure if this helped

-- variables
TS = game:GetService("TweenService")
userInputService = game:GetService("UserInputService")

CamCheck = false

cc = workspace.CurrentCamera

plr = game.Players.LocalPlayer.Character

mc = workspace.menuCam

playB = game.Players.LocalPlayer.PlayerGui.Menu.playB

settingsB = game.Players.LocalPlayer.PlayerGui.Menu.settingsB

cc.CameraType = Enum.CameraType.Scriptable

cc.CFrame = mc.CFrame

startVol = game.SoundService.menuMusic.Volume
	
darken = script.Parent.Parent.Parent.darkener.darken

guideTxt = game.Players.LocalPlayer.PlayerGui.guide1.text

-- functions

local function playClick()
game.Players.LocalPlayer.PlayerGui.Menu.Enabled = false
	userInputService.MouseIconEnabled = false
	
	while darken.Transparency >= 0 do
		wait(0.01)
		darken.Transparency -= 0.02
		game.SoundService.menuMusic.Volume -= (startVol/100)*2
	end
	
	--gameplay settings
	plr.Humanoid:RemoveAccessories()
	game.Lighting.Atmosphere.Density = 0.9
	game.Lighting.Brightness = 0.5
	plr:MoveTo(workspace.startBlock.Position)
	camCheck = true
	wait(0.1)
	game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
	wait(0.5)
	game.SoundService.wind.Playing = true
	
	--enable scripts
	game.Players.LocalPlayer.PlayerScripts.ambience1.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience2.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience3.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.ambience4.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.flashlight.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.walkSounds.Disabled = false
	game.Players.LocalPlayer.PlayerScripts.sprint.Disabled = false
	
	if darken.Transparency <= 1 do
TS:Create(darken, TweenInfo.new(2), {TextTransparency = 1}):Play()
	end	
	
task.wait(2)	


	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 0, TextStrokeTransparency = 0}):Play()
		task.wait(5)
	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
	end

--[[
while guideTxt.TextTransparency > 0 do
		wait(0.01)
		guideTxt.TextTransparency -= 0.02
		guideTxt.TextStrokeTransparency -= 0.02
	end
	
	wait(5)
	while guideTxt.TextTransparency < 1 do
		wait(0.01)
		guideTxt.TextTransparency += 0.02
		guideTxt.TextStrokeTransparency += 0.02
]]

playB.MouseButton1Click:Connect(playClick)

That would only seem to make the loading inconsistent. The --[[ tip is nice though.

This seems more like a GUI issue than a scripting issue at this point. I removed the scripting tag.

you may need to delay the text transparency tween for about 0.3 secs
Or speed the text stroke tween little a bit

What should I change here to delay it for 0,3s?

	
	local TS = game:GetService("TweenService")

	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 0, TextStrokeTransparency = 0}):Play()
		task.wait(5)
	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
	end

Im currently testing the method out. the tween has a delay argument at the end of the tween info

Wouldn’t that delay both the txt and stroke

nope, the tween doesn’t yield the thread/scope that it is in

you can try one of those methods:
speeding up the text stroke transparency to nearly sync with the text transparency:

	TS:Create(guideTxt, TweenInfo.new(2.15), {TextStrokeTransparency = 0}):Play()
	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 0}):Play()
	task.wait(4)
	TS:Create(guideTxt, TweenInfo.new(2.15), {TextStrokeTransparency = 1}):Play()
	TS:Create(guideTxt, TweenInfo.new(2), {TextTransparency = 1}):Play()

Delaying the text transparency little a bit:

    TS:Create(guideTxt, TweenInfo.new(2), {TextStrokeTransparency = 0}):Play()
	TS:Create(guideTxt, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0.28), {TextTransparency = 0}):Play()
	task.wait(4)
	TS:Create(guideTxt, TweenInfo.new(2), {TextStrokeTransparency = 1}):Play()
	TS:Create(guideTxt, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0.28), {TextTransparency = 1}):Play()

Unfortunately they both have the same effect as the original code. I also tried changing fonts, but it didn’t help either :confused:

try to play with delay seconds or play with the speed of the stroke
edit: I guess there is a problem…

I played around, and it doesn’t change anything meaningfull from what I can see

I think I didn’t understand your issue right

Here you can see the problem in studio. Once I change txt transparency to 0,9 it becomes very bright. In other words the txt stroke is literally taking over the text and acts like its transparency = 0 and is therefor fully white.
ezgif.com-gif-maker (1)
t