DasKairo
(Cairo)
November 7, 2022, 2:35pm
#21
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)
youbigown
(youbigown)
November 7, 2022, 2:39pm
#22
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.
EgizianoEG
(Egiziano)
November 7, 2022, 2:39pm
#23
you may need to delay the text transparency tween for about 0.3 secs
Or speed the text stroke tween little a bit
youbigown
(youbigown)
November 7, 2022, 2:41pm
#24
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
EgizianoEG
(Egiziano)
November 7, 2022, 2:42pm
#25
Im currently testing the method out. the tween has a delay argument at the end of the tween info
youbigown
(youbigown)
November 7, 2022, 2:43pm
#26
Wouldn’t that delay both the txt and stroke
EgizianoEG
(Egiziano)
November 7, 2022, 2:45pm
#27
nope, the tween doesn’t yield the thread/scope that it is in
EgizianoEG
(Egiziano)
November 7, 2022, 2:47pm
#28
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()
youbigown
(youbigown)
November 7, 2022, 2:50pm
#29
Unfortunately they both have the same effect as the original code. I also tried changing fonts, but it didn’t help either
EgizianoEG
(Egiziano)
November 7, 2022, 2:51pm
#30
try to play with delay seconds or play with the speed of the stroke
edit: I guess there is a problem…
youbigown
(youbigown)
November 7, 2022, 2:56pm
#31
I played around, and it doesn’t change anything meaningfull from what I can see
EgizianoEG
(Egiziano)
November 7, 2022, 3:01pm
#32
I think I didn’t understand your issue right
youbigown
(youbigown)
November 7, 2022, 3:07pm
#33
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.
t
EgizianoEG
(Egiziano)
November 7, 2022, 3:10pm
#34
Did you try a UIStroke for the text label?
Like instead of the textlabel’s stroke
1 Like
EgizianoEG
(Egiziano)
November 7, 2022, 3:11pm
#35
it will be separate from the textlabel with its own rendering
youbigown
(youbigown)
November 7, 2022, 3:13pm
#36
Glad I know that exists now. Thank you for the help.
1 Like
EgizianoEG
(Egiziano)
November 7, 2022, 3:15pm
#37
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()
youbigown
(youbigown)
November 15, 2022, 11:12pm
#39
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
system
(system)
Closed
November 29, 2022, 11:12pm
#40
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.