06-04-2011, 11:53 AM
[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
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