I'm making the script so the rocket can finnaly liftoff™. But i'm running into this:
19:56:26.883 - Workspace.R1Upgrade-1.LaunchScript:23: attempt to call a table value
This is line 23 and everything related to it:
local speed = 0 speed = speed * 1.01 script.Parent:SetPrimaryPartCFrame( script.Parent.PrimaryPart.CFrame + Vector3( script.Parent.PrimaryPart.Position.X, script.Parent.PrimaryPart.Position.Y + speed, script.Parent.PrimaryPart.Position.Z ))
I'm really confused.
Lua Objects are essential arrays with metamethods to modify the data. Vector3
is one of these Objects. You forgot to initiate the Object with it’s constructor .new()
, meaning it isn’t returning any complete userdata, leaving only the array to stand. That is causing your Attempt to call a table
flag.
local speed = 0 speed = speed * 1.01 script.Parent:SetPrimaryPartCFrame( script.Parent.PrimaryPart.CFrame + Vector3.new( script.Parent.PrimaryPart.Position.X, script.Parent.PrimaryPart.Position.Y + speed, script.Parent.PrimaryPart.Position.Z ))