Need help removing flash bang effect from gui text

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

Did you try a UIStroke for the text label?
Like instead of the textlabel’s stroke
image

1 Like

it will be separate from the textlabel with its own rendering

Glad I know that exists now. Thank you for the help.

1 Like

No problem, it’s nice to know that it solved your issue!

1 Like

Why don’t you try using Tweens instead of loops?

local TweenService = game:GetService("TweenService")

TweenService:Create(guideTxt, TweenInfo.new(0.6), {TextTransparency = 0}):Play()
TweenService:Create(guideTxt,  TweenInfo.new(0.6), {TextStrokeTransparency = 0}):Play()

wait(5)

TweenService:Create(guideTxt, TweenInfo.new(0.6), {TextTransparency = 1}):Play()
TweenService:Create(guideTxt,  TweenInfo.new(0.6), {TextStrokeTransparency = 1}):Play()

loops are generally easier to make and edit (for me)
ofc I use tweens if it’s 3d, but single properties like transparency I prefer loop

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.