Require special currency to teleport

hey, can someone help me with a special currency, what I mean by that is say you have money and multipliers you need to have 100Multipliers if you got less you cant teleport but if you got more then you can still teleport can someone help me with this thx

2 Likes

Please do not ask vague questions, we’re here to help you with a problem and not write a script for you. Doing this just requires the most basic knowledge of roblox development. We cannot help you if you don’t offer any example or attempt of yours.

5 Likes

my qeustion was more like what sort of script do i use touch event or …

maybe some if statement, I’m not the best scripter but that could work

1 Like

Try then, try some possibilites and tell us what worked or not, and we’ll show you the correct way. You need to do this, so we can know how experienced you are.

This would just need a simple if statement, that checks for a value being higher then a certain required amount.

1 Like

okay this is what i can do robloxapp-20200325-1711159.wmv (1.4 MB)

what is the best way to learn scripting

Just use a touch event then check if the player has the multi…

if i make a touch event then people that do not have the requirement can pass becose off other people thas the requirement

check if they have it

30chars

I’m not going to write the full script for you but here is an example of how you would do this

if PlayerMultipliers > MultipliersNeeded then
    -- TELEPORT CODE HERE
end

k thanks i will see if this helps me

I personally learnt scripting through watching videos, experimenting, and practicing. The devhub as well as these forums are a great resource!

As for your original question, have a touched event, and upon touching validate if the player meets the requirement though an if statement. Finally, if they meet the requirements, teleport the player to the desired location using something such as Character:MoveTo(Vector3 position)

1 Like

idk where i can place it in the script

add a on touch and do something like this (IF YOU HAVE A NUMBER VALUE IN A FOLDER IN THE PLAYER)
local plr = game.Players.LocalPlayer
if plr.Data.BlaBla.Value <= then
teleport
end

please correct me if i am wrong as i am still learning :grin:

Place this where you are teleporting the player. That code I put is checking if the player has the required amount of multipliers, it’d help great if you put your code here so I can see what you have already

this is the teleport script

You shouldn’t use a localscript for something like this as it’s very easy for exploiters to manipulate. Checks and validations should be done on the server.

Edit:
Additionally, you are checking if the players value is LESS THAN or equal to rather than GREATER THAN.

where do i place the extra script part

Ok so you want to add an if statement around where you actually teleport the player
Then you check if the player has the required amount of multipliers