Problem with link()
#1
[lua]t = { script.Parent, script.Parent.Parent.Box1, script.Parent.Parent.Box2 }

function ERP()
if game.World.KEYValue.Value > 0 and script.Parent.CharacterCollide ~= false then
game.World.KEYVALUE.Value = game.World.KEYVALUE.Value - 1
t.CharacterCollide = false
end
end

link(t.Collided, ERP)[/lua]

I can't tell if I'm having a brainfart or not, but I get an error on that last line telling me link() needs an event and a function
Reply
#2
Yup. What you need is

[lua]
for q = 1, #t do
link(t[q].Collided, ERP)
end
[/lua]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)