Hello , I'm trying to launch random functions that are in a table. This is what I'm currently trying: I changed some of the code
c=script.Parent
L1=c.Lane1
L2=c.Lane2
L3=c.Lane3
L4=c.Lane4
Key = {}
Key.Left = function (Left) L1.A1:TweenPosition(UDim2.new(0,0,-0.137,0)"Out","Quad",4)end
Key.Down = function (Down) L2.A2:TweenPosition(UDim2.new(0,0,-0.137,0)"Out","Quad",4)end
Key.Up = function (Up) L3.A3:TweenPosition(UDim2.new(0,0,-0.137,0)"Out","Quad",4)end
Key.Right = function(Right) L4.A4:TweenPosition(UDim2.new(0,0,-0.137,0)"Out","Quad",4)end
wait(1)
while true do
Key[math.random(#Key.Left,Key.Down,Key.Right,Key.Up)]()
end
This is the output :
Players.Player1.PlayerGui.GuiGame.DDR.Script:16: attempt to get length of field 'Left' (a function value)

3 comments
@trytoeatme, oh that was an error I made when trying to copy and paste the script to here. I dont think that was the issue.
ah, okay. one sec.
18:49:48.636 - Players.Player1.PlayerGui.GuiGame.DDR.Script:7: attempt to call a userdata value 18:49:48.636 - Stack Begin 18:49:48.636 - Script 'Players.Player1.PlayerGui.GuiGame.DDR.Script', Line 7 - global Pat 18:49:48.637 - Script 'Players.Player1.PlayerGui.GuiGame.DDR.Script', Line 23 18:49:48.637 - Stack End