Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Attempt to call table value when not calling a table value?

script.Parent.Triggered:Connect(function(player) local character = player.Character

if player.leaderstats.Rebirths.Value >= script.Parent.Parent.Parent.Price.Value then
	script.Disabled = true
	script.Parent.Enabled = false
	player.PlayerGui.PortalFX.TextLabel.Visible = true
	player.PlayerGui.PortalFX.Circle:TweenSize(UDim2(0, 0,2.5, 0))
	wait(1)
	character.Head.CFrame = CFrame.new(game.Workspace:WaitForChild("50 Rebirths").Position)
	wait(1)
	player.PlayerGui.PortalFX.Circle:TweenSize(UDim2.new(1.5, 0,2.5, 0))
	script.Disabled = false
	script.Parent.Enabled = true
	player.PlayerGui.PortalFX.TextLabel.Visible = true
end

end)

Its giving me an error for this line: "player.PlayerGui.PortalFX.Circle:TweenSize(UDim2(0, 0,2.5, 0))" Saying that its attempting to call a table value

I am not trying to make a table value, I was just trying to follow a tutorial for a portal teleporting system.

1 answer

TweenService takes a table for the parameters and gets the matching properties for it. I believe it should be fixed if you try this?

local size = {}
size.Size = Udim2.new(1.5,0,2.5,0)
player.PlayerGui.PortalFX.Circle:TweenSize(size)

Let me know if this worked.

4 comments

0

Oh I see the issue. Let me edit and fix it

0

add that to your code

0

I forgot to post here, all i needed to do was add the ".new" after UDIM2, just a simple error. Thanks for the effort though :)

0

In your code that you posted here I see the Udim2.new() already? Did you edit it afterwards? If I saw it earlier I would've caught it I think but np :)

This discussion is preserved as it was. New answers, comments, and votes are closed.