#GUI Transperency doesn't change in real time

1 messages · Page 1 of 1 (latest)

cobalt forge
#

I have a for loop that gradually put the transparency of a frameGUI lower and lower, but the problem is that it doesn't change in real time, the data property does keep changing but nothing happens on the screen until the end of the loop

mossy fossil
#

its because Transparency value is 0-1

#

not 1-100

#

also i recommend using Tweens instead of for loops

granite bone
#

wait you can use tweens for transparency?

mossy fossil
#

i mean like Transparency, Size, Position, Density, Value, etc

granite bone
#

i see

cobalt forge
#

thank you so much

cobalt forge
#

is tweens just better than for loops on these occasions ?

mossy fossil
#

smoother animation

fleet sundial
cobalt forge
fleet sundial
#

especially scales

cobalt forge
#

Quick question before I put this thread as solved, how do i make the frame cover the entire screen?, because when i play, the frame only covers a part of the screen, but the toppart where the roblox logo is, it doesnt cover that for some reason, and also some tips for better coding ? 🥺

mossy fossil
fleet sundial
#

enable a property called IgnoreGuInSET

cobalt forge
cobalt forge
#

but fr thank you so much yall

fleet sundial
glossy cipher
#

you can also customize it very throughly with tweens unlike for loops which require additional scripting

#

for example on tweens you can set easing styles for the tweens to make it do things like slowly fade in or out

#

or make it reverse when after it does the tween

cobalt forge
cobalt forge
glossy cipher
#

tweens are better in the long run unless you need to script custom behavior during the tween

obsidian yokeBOT
#

studio** You are now Level 2! **studio

glossy cipher
#

even then you can still make custom behavior during tweens

cobalt forge
#

lol

glossy cipher
#

the one thing I think that makes for loops better than tweens for those effects is if you're scripting custom behavior during the tween that controls the tween as well

#

but other than that tweens are generally better for every use case like that

cobalt forge
#

I see, so tweens are just generally better for transactions ?

#

transitions*

#

idk why i said that

glossy cipher
#

if you're trying to transition a number to another number smoothly then use tweens

#

if you're trying to do something like decrease a value linearly until it reaches another value then use for loops

cobalt forge
#

doesnt tweenservice also provide a linear event ?

glossy cipher
#

best example I can think of is like if for example you're trying to gradually decrease the range of a light until it reaches zero, then use tween service

#

however if you're doing something like, for example, making a clock tick down to zero, use a for loop for that instead of a tween

glossy cipher
#

using tweenservice for something purely depends on what it is that you're actually trying to do with the number

cobalt forge
#

got it, well I willl try to use more functions then

#

like premade functions from the roblox lib

glossy cipher
#

also something i don't know if other people mentioned is that tween service actually works with alot of things that involve numbers

#

something that is really hard to code with a for loop most likely is actually really easy with a tween

#

for example smoothly transitioning the color of a brick to a different color

#

whereas a for loop would require a bunch of lines of code reconfiguring all rgb values with calculations to transition to the color you want, tween service is as simple as stating the color you want it to change to, and then just playing the tween

cobalt forge
glossy cipher
#

functions are just functions

#

you can put a tween inside one and call it perhaps

#

functions are different things entirely from tweens

cobalt forge
#

no no yea, like when i'm saying functions, I'm saying like "TweenService", CFrame.look at and etc..

#

like instead of just trying to invent the wheel, I should just use tools that roblox already offers

glossy cipher
#

I guess

#

tweens are just more efficient and easier to use than making transitions yourself in for loops

cobalt forge
#

got it, thank you man, imma use it more often then