Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you teleport a player based on their level?

Asked by 4 years ago

Basically I'm looking for a script that teleports you based on an in-game level system. If the player's level is the minimum required or higher, when they click the GUI button (not a part) it will teleport them to xyz.

0
dam simulators... TheluaBanana 946 — 4y
0
This question is very broad. Please refrain from asking these sorts of questions in the future. DeceptiveCaster 3761 — 4y

1 answer

Log in to vote
0
Answered by
noammao 294 Moderation Voter
4 years ago

There are a lot of different ways. And it also greatly depends on how you chose to create your level system. Therefore I can't really know what exactly you need help with. But let's say that you're using an integer value as a way to represent the players level ( integer value as in "Instance.new("IntValue")). What you could do is: '

local minimumRequirement = 5
local intvalue = Instance.new("IntValue")
intvalue.Parent = = game.Players.LocalPlayer.Character --Parent can be wherever you want. Just make it convinient.
if intvalue.Value <=  minimumRequirement then
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(X,Y,Z)
end

This script won't work but I hope you get a general idea of how you can go about it.

Ad

Answer this question