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

Expect table not value??

Asked by
korj5 0
8 years ago
script.Parent.Sensor.Touched:connect(function(whoWasThat)
for _,w in pairs() do
                    if w:IsA("VehicleSeat") then
                        local speed = math.floor(math.sqrt((w.Velocity.x^2)+(w.Velocity.y^2)+(w.Velocity.z^2)))
                        if speed >maxspeed then

if speed > maxspeed then
        print("BEEEE")
end
end

14:53:05.859 - Workspace.SlidingDoor.OutsideSensor.Sensor Script:20: bad argument #1 to 'pairs' (table expected, got no value) 14:53:05.861 - Script 'Workspace.SlidingDoor.OutsideSensor.Sensor Script', Line 20 14:53:05.862 - Stack End

I have no idea what to do with this one?

1
What exactly are you trying to loop through? Pyrondon 2089 — 8y
0
Nice of you giving me negative point. korj5 0 — 8y
0
When Sensor found the vehicleseat within above 30 MaxSpeed in workspace, then the sliding door will be unanchored, explodes. korj5 0 — 8y

Answer this question