Hello, I was wondering if it is possible to associate a value to bricks, I explain myself
let's imagine a pill 1 and 2, and a value on 2 if I remove 1 from my value, the pill disappears and vice versa
is it possible?
Yeah, it is possible. <pre> local pill1 = PATH OF PILL (e.g workspace.Model.Pill1) local pill2 = PATH OF PILL (e.g workspace.Model.Pill2) local pill3 = PATH OF PILL (e.g workspace.Model.Pill3) local pill4 = PATH OF PILL (e.g workspace.Model.Pill4) local pill5 = PATH OF PILL (e.g workspace.Model.Pill5)
local pill_Int1 = toNumber(pill1.Name) - NUMBER local pill_Int2 = toNumber(pill2.Name) - NUMBER local pill_Int3 = toNumber(pill3.Name) - NUMBER local pill_Int4 = toNumber(pill4.Name) - NUMBER local pill_Int5 = toNumber(pill5.Name) - NUMBER
if pill_Int1 < pill_Int2 then pill1:Destroy() -- Bye-bye pill 1
if pill_Int2 < pill_Int3 then pill1:Destroy() -- Bye-bye pill 2
if pill_Int3 < pill_Int4 then pill1:Destroy() -- Bye-bye pill 3
if pill_Int4 < pill_Int5 then pill1:Destroy() -- Bye-bye pill 4
if pill_Int5 < 6 then pill1:Destroy() -- Bye-bye pill 5 </pre>
Good luck, recanman