Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

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

Asked by 6 days 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. V3N0M_Z 75 — 6d

1 answer

Log in to vote
0
Answered by
gioni01 1494 Moderation Voter
6 days ago
Edited 6 days 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 15 — 6d
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 15 — 6d
0
edited gioni01 1494 — 6d
Ad

Answer this question