Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 1 year ago
Edited 1 year ago

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

Log in to vote
0
Answered by
manith513 121
1 year ago
Edited 1 year ago

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.

0
Oh I see the issue. Let me edit and fix it manith513 121 — 1y
0
add that to your code manith513 121 — 1y
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 :) xTheodxre 16 — 1y
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 :) manith513 121 — 1y
Ad

Answer this question