I’m currently creating a project that is similar to the Pokemon games. Don’t worry nothing copyrighted. I’m having a bit of trouble making the name of a move appear correctly onto a move slot. What I need to happen is for a move to go onto a move slot for every single equipped move.
What’s wrong is that either the move gets on all of the move slots or it doesn’t appear at all.
Here is an example of what I’ve done:
(For this one all of the move slots become one move)
local function setMoveSlots(MoveSlots, playerMonster)
for _, MoveSlot in ipairs(MoveSlots:GetChildren()) do
for _, Move in pairs(MonstersModule.Monsters[playerMonster]["Moves"]) do
if MoveSlot.Text ~= Move.Name or MoveSlot.Name == "MoveSlot" then
print(MoveSlot.Text)
MoveSlot.Text = Move.Name
end
end
end
end
What am I doing incorrectly?
Thank’s for reading! 