Attempt to call a table value (while Tweening) Error

Hey guys! I’m trying to Tween a GUI but I got a problem, when I try to Tween it, it gives me an error saying:

Players.(MyName).PlayerGui.TweeningGui.TweeningShadow.TweenShadow:10: attempt to call a table value

I know there is a lot of good people in the devforum, so if you that can give me a hand with this , I’ll appreciate your help very much, have a good day! :wave: :smiley: :wink:

Here’s the script

  • I’m in a LocalScript

Hey guys! I’m trying to Tween a GUI but I got a problem, when I try to Tween it, it gives me an error saying:

Players.(MyName).PlayerGui.Gui.TweenExample:10: attempt to call a table value

I know there is a lot of good people in the devforum, so if you that can give me a hand with this , I’ll appreciate your help very much, have a good day! :wave: :smiley: :wink:

Here’s the script

while wait(1) do
	if game.ReplicatedStorage:WaitForChild('BoolValue').Value == true then
		break
	end
end

if game.ReplicatedStorage:WaitForChild('BoolValue').Value == true then
	local player = game.Players.LocalPlayer
	local Frame = player.PlayerGui.Gui.TweenExample
	Frame:TweenPosition(UDim2(0,0,0,0),"Out","Sine",3)
end

I also tried to do with :

local Frame = script.Parent.Frame

(With the LocalScript inside the ScreenGui)

1 Like
while wait(1) do
	if game.ReplicatedStorage:WaitForChild('GivingTweens').Value == true then
		break
	end
end

if game.ReplicatedStorage:WaitForChild('GivingTweens').Value == true then
	local player = game.Players.LocalPlayer
	local Frame = player.PlayerGui:WaitForChild('TweeningGui').TweeningShadow.Frame
	Frame:TweenPosition(UDim2.new(0,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 3)
end

You were just missing .new after UDim2. You don’t need to replace the string values with enums but I did anyway.

4 Likes