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

how to make script to teleport to a new place when reached a kill count on leaderboard?

Asked by 5 years ago

so let's say you have a leader stat called "kills"

how would make it so when you reach a specific amount, say 5, kills you teleport to another game?

0
You can use an event to check if the leaderstat value reached the desired number and just teleport the player. Wicked_Wlzard 110 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Here's a way to do this. I made the leaderstats for you, but you can remove them and put in your own system. Basically, anything that may be new to you is listed in the resources section below the script. In the future, please post your attempt at solving the problem before posting a question. This is a server script

local TeleportService = game:GetService("TeleportService")
local PlaceId = 000

game:GetService("Players").PlayerAdded:Connect(function(plr)
   local leaderstats = Instance.new("Folder")
   leaderstats.Name = "leaderstats"
   leaderstats.Parent = plr
   local kills = Instance.new("IntValue")
   kills.Name = "Kills"
   kills.Parent = leaderstats
   kills:GetPropertyChangedSignal("Value"):Connect(function()
      if kills.Value >= 5 then
         TeleportService:Teleport(PlaceId,plr)
      end
   end)
end)

Resources:

:Teleport()

:GetPropertyChangedSignal()

Accept and upvote if this helps!

0
not what i was looking for, i'm take about to teleport to another game, as like a actual game with a id itadakimasu_Kurepu 29 — 5y
0
for example your in game one, then when you reach the kills, you go to game 2, another whole game where you teleport to itadakimasu_Kurepu 29 — 5y
0
edited Gey4Jesus69 2705 — 5y
Ad

Answer this question