Jump to content

attachelement with sourcePlayer


adamb

Recommended Posts

for k, v in ipairs(players) do 
    circlearea2 = createColCircle(0, 0, 5) 
    if circlearea2 then 
        attachElements(circlearea2, sourcePlayer) 
    end 
    bindKey(v, "i", "down", "checkdriver") 
end 

error: expected element, got nil

What did i do wrong?

Link to comment
  • Moderators
for k, player in ipairs(getElementsByType("player")) do 
        local circlearea = createColCircle(0, 0, 5) 
        if circlearea then 
            attachElements(circlearea, player) 
        end 
        bindKey(player, "i", "down", "checkdriver") 
    end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...