I suppose you could do this:
Code: Select all
local starCoinsTotal = 3 -- Replace with how many star coins you placed in the editor
local starCoinsCollected = starCoinsTotal - #NPC.get(310)
But I don't actually know how to block the player from using a warp.
You could spawn some blocks to block the warp and then remove them when the player
gets enough, But if you want to do it without that I've got nothing.