#turn cycling system
1 messages · Page 1 of 1 (latest)
create a remotevent and put this piece of code at the end of the loop for i, enemy in pairs(enemies)
mouse.Button1Down:Connect(function()
local target = mouse.Target
if target and enemy:IsAncestorOf(target) then
for _, a in pairs(allArrows) do
if a and a.Parent then
a:Destroy()
end
end
allArrows = {}
selectedEnemy = enemy
game.ReplicatedStorage.yourfolder:WaitForChild("RemoteEvent"):FireServer({
Move = selectedMove,
Target = selectedEnemy
})
end
end)