Hello! For some reason, this won’t tween even though its being activated can someone help?
local Notify = MainGui:WaitForChild("Notify")
if answer == "Open" then
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), "Out", "Quad", 1)
--{0.444, 0},{0.169, 0} tip size
Notify.Main.Text = " "
print(Notify.Main.Text)
elseif answer == "Stay" then
Notify.Main.Text = "message"
end
end)
1 Like
112365595
(Cupcakegaming445)
January 18, 2021, 11:08pm
#2
Is the answer Open and are there any errors in output?
I believe that you need to play the tween. Maybe try:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), "Out", "Quad", 1):Play()
XdJackyboiiXd21:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), "Out", "Quad", 1):Play()
Players.BasicUserID.PlayerGui.LocalScript:91: attempt to index boolean with ‘Play’
did not work
112365595
(Cupcakegaming445)
January 18, 2021, 11:20pm
#5
You don’t play TweenSize/TweenPosition tweens
112365595
(Cupcakegaming445)
January 18, 2021, 11:20pm
#6
Whats answer right now and are there any errors in output?
trzistan
(Triz)
January 18, 2021, 11:24pm
#7
Can you provide specific instructions? How does this source work? What’s the objective? I’m confused of what part of the code must activate.
1 Like
its getting a event fire from the server with a message and command and if its true then it will tween the size of a tip bar
trzistan
(Triz)
January 18, 2021, 11:28pm
#9
Have you tried printing a message in every part of the code?
BasicUserID
(BasicUserID)
January 18, 2021, 11:44pm
#10
yes it works up to the tween
INT_L
(INT_L)
January 18, 2021, 11:46pm
#11
You have to use Enums when specifying EasingStyle and EasingDirection in your tween parameters (same applies to TweenInfo):
BasicUserID:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), "Out", "Quad", 1)
Currently, they are strings in your code, switch them to Enums, like this:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1)
If your code still doesn’t work after applying the change, try playing the tween outside of the function, if it works, there’s something wrong with your function.
Edit: Turns out you can substitute Enums with strings, learnt something new today, thanks @112365595 !
1 Like
BasicUserID
(BasicUserID)
January 18, 2021, 11:49pm
#12
INT_L:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1)
thanks it did not work so ima look into my function
112365595
(Cupcakegaming445)
January 18, 2021, 11:59pm
#13
No you don’t need to use Enums what you on about? You can substitute it for strings infact i think you can substitute any Enum for a string.
1 Like
Put this line of code before your if
statement, to check if answer
== “Open”:
print(answer)
EmeraldLimes:
print(answer)
it printed “Open”
and printed print(Notify.Main.Text)
A couple of debugging steps:
Check if the size you’re tweeting it to is the size that the GUI is already at
Check if the GUI is visible
Check if the GUI is covered/overlapped by another GUI
SOTR654
(SOTR654)
January 19, 2021, 2:10am
#18
Change this:
BasicUserID:
Notify:TweenSize(UDim2.new(0.5, 0, 0.169, 0), "Out", "Quad", 1)
For this:
Notify:TweenSize(UDim2.fromScale(0.5,0.169))
Change something?
did not work sorry maybe its bc my gui is too small or soemthin
SOTR654
(SOTR654)
January 19, 2021, 2:14am
#20
I don’t think size is the problem. What’s the classname of Notify?