local a = game.ReplicatedStorage:WaitForChild("A").Cards:FindFirstChild(math.random(1,2))
local c = a:GetChildren()
local e = a.Name .. "s"
local f = c[math.random(1,#c)]
script.Parent.Image = f.Image
local TweenService = game:GetService("TweenService")
local TweenInfov = TweenInfo.new(
0.2,
Enum.EasingStyle.Exponential,--EasingStyle
Enum.EasingDirection.In,--Easing direction
0,--times to repeat
false,--goes in reverse
0--delay
)
local PartProperties = {Position = UDim2.new(script.Parent.Parent:FindFirstChild(e).Position.X.Scale,0,script.Parent.Parent:FindFirstChild(e).Position.Y.Scale,0 ) }
local Tween = TweenService:Create(script.Parent,TweenInfov,PartProperties)
The game tells me image is not a valid member of workspace “Workspace” on line 6 and the tween just moves forward a tiny bit for some reason. And when I print f, the output is the correct one
Could this be the main source that could be causing it? I don’t see any other reason why it’s doing that unless if you use WaitForChild() for the f variable
No, the error was from another script, which was a copy of the original, so I dont have the issue with the output anymore, but the tween is still broken