Yogoskuy
(Yogoskuy)
March 31, 2022, 11:34am
1
So I did this local script, but then there is a problem
local player = game.Players.LocalPlayer
local ScreenGui = player.PlayerGui.ScreenGui
local object = ScreenGui.Frame
local TweenService = game:GetService("TweenService")
object.Position = UDim2.new(0.87, 0, 1.1, 0)
local goal = {}
goal.Position = UDim2.new(0.87, 0, 0.95, 0)
local tweenInfo = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Sine, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tween = TweenService:Create(object, tweenInfo, goal)
object.Transparency = 0
object.TextLabel.TextTransparency = 0
local goal2 = {}
goal2.Transparency = 1
goal2.TextLabel.TextTransparency = 1
local tweenInfo = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Sine, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tween2 = TweenService:Create(object, tweenInfo, goal2)
game.ReplicatedStorage.ShowText.OnClientEvent:Connect(function()
tween:Play()
wait(5)
tween2:Play()
end)
The problem is in this part:
local goal2 = {}
goal2.Transparency = 1
goal2.TextLabel.TextTransparency = 1
I dont know whats wrong with it, I hope someone know how to fix this. Thanks!
2 Likes
Motofied
(Moto)
March 31, 2022, 11:54am
2
local goal2 = {}
goal2.Transparency = 1
goal2.TextTransparency = 1 --you originally had "goal2.TextLabel.TextTransparency"
1 Like
Mister33j
(qharntne)
March 31, 2022, 12:36pm
3
for the middle of the error part, did you mean BackgroundTransparency
instead of just Transparency
?
Yogoskuy
(Yogoskuy)
March 31, 2022, 12:55pm
4
Its located like this soo…
Yogoskuy
(Yogoskuy)
March 31, 2022, 12:55pm
5
Ohh yea, backgroundtransparency, letme try that
Yogoskuy
(Yogoskuy)
March 31, 2022, 12:57pm
6
Still no,
Line 34 is this:
goal2.TextLabel.TextTransparency = 1
Mister33j
(qharntne)
March 31, 2022, 1:02pm
7
goal2 is a table, maybe you can do this
local goal2 = 1
--other line
local tween2 = TweenService:Create(object, tweenInfo, {BackgroundTransparency = goal2})
local tween2A = TweenService:Create(object, tweenInfo, {TextTransparency = goal2})
--put this in function loop
tween2A:Play()
(wait it’s because you’re merging 2 different properties with the same values)
1 Like
Yogoskuy
(Yogoskuy)
March 31, 2022, 1:09pm
8
Ah ok let me try that. Thank you
Yogoskuy
(Yogoskuy)
March 31, 2022, 1:14pm
9
Its working! Thank you so much!
1 Like
Forummer
(Forummer)
March 31, 2022, 2:45pm
10
The goals parameter of the TweenService method named “:Create()” does not accept references to instances, those references should be passed as the first argument to the method.
The goals table’s keys/indices should match the names of properties of the object you intend to tween, the values assigned to those keys/indices are the goals of the aforementioned properties.
Yogoskuy
(Yogoskuy)
March 31, 2022, 3:01pm
11
Oh okay. Thank you so much for the information!