Pay game coins to teleport somewhere

Hey i need help with this :
I wanted in where i can pay game coins in exchange to teleport somewhere and re teleport when i hit a brick on the other side, i tried fixing it for a while but got no where any one who can help?

image

1 Like

What’s the issue? Is there any code at all that you can show? Any errors? The teleport service can be used at any time, but you just have to set the trigger

1 Like

You can use TeleportService at any time. I’m not sure if you want us to help with an error.
If you’re wondering how to do it, you just have to check if the brick is touched, implement a debouncing system of some sort then simply teleport (whether it’s between places or between places in a place)
Anyway, I hope you get what you need done.
DevForum community members are here to help you at anytime!
:grin:

1 Like

you want that teleport to brick or place/game?

Without code, we can’t really help you.

But here’s what you could do.

When the player touches the teleporter, add a check if he has the required amount of money, then decrease their amount by the money they need to pay and then teleport them.

Hey @BloxCraftStudi!

How I would do it is, listen for when the brick is touched using Part.Touched:Connect(), check the players coins value and if they have the correct amount of coins then teleport them (and deduct their coins if you wish). If they do not have enough coins, simply ignore them or tell them that they do not have enough coins.

Additionally, getting back is easy, just have a portal in the other game for everybody to use to get back, once touched, teleport them back to the main game. This can all be done using TeleportService.

I hope my reply helped. Let me know if you get stuck or confused on anything and I will be more than willing to further assist you.

Cheers and take care,
Bruce

1 Like

Your best option is when they attempt to teleport a gui or something shows up saying you need a specific ammount of coins to enter or you have enough to enter. (CurrencyNeeded - Coins = Text) Then use a datastore to make sure that when the player rejoins they can use the teleporter again.

personally i would make it so the player would have to buy a key, and tell the script that if the player doesnt own the key for that area they cant teleport, kind of hard to help exactly though, without any example code