I have a script that I would like to revist. I don’t want it to kill the player but instead to teleport it to a spesifc postion. I can’t find anything like that online though.
Questions
Can you move a players position?
How can you do that?
Script
local part = script.Parent
local deb = false
local gamepass1 = 18141166
local gamepass2 = 18141180
local marketplaceService = game:GetService('MarketplaceService')
--- Gamepass 1 is wins
--- Gamepass 2 is coins
local debtime = 1
part.Touched:Connect(function(hit)
local touchPlayer = game.Players:GetPlayerFromCharacter(hit.Parent)
if not touchPlayer or deb then return end
local textLabel = touchPlayer.PlayerGui.Winnerpartthing.Level1
deb = true
if marketplaceService:UserOwnsGamePassAsync(touchPlayer.UserId, gamepass1) and marketplaceService:UserOwnsGamePassAsync(touchPlayer.UserId, gamepass2) then
hit.Parent:FindFirstChild('Humanoid').Health = 0
touchPlayer.leaderstats.Wins.Value += 2
touchPlayer.leaderstats.Coins.Value += 100
textLabel.Text = "Congrats on beating Level 1. You Have earned some rewards!"
textLabel.Visible = true
wait(4)
textLabel.Visible = false
wait(debtime)
deb = false
elseif marketplaceService:UserOwnsGamePassAsync(touchPlayer.UserId, gamepass1)then
hit.Parent:FindFirstChild('Humanoid').Health = 0
touchPlayer.leaderstats.Wins.Value += 2
touchPlayer.leaderstats.Coins.Value += 50
textLabel.Text = "Congrats on beating Level 1. You Have earned some rewards!"
textLabel.Visible = true
wait(4)
textLabel.Visible = false
wait(debtime)
deb = false
elseif marketplaceService:UserOwnsGamePassAsync(touchPlayer.UserId, gamepass2) then
hit.Parent:FindFirstChild('Humanoid').Health = 0
touchPlayer.leaderstats.Wins.Value += 1
touchPlayer.leaderstats.Coins.Value += 100
textLabel.Text = "Congrats on beating Level 1. You Have earned some rewards!"
textLabel.Visible = true
wait(4)
textLabel.Visible = false
wait(debtime)
deb = false
else
hit.Parent:FindFirstChild('Humanoid').Health = 0
touchPlayer.leaderstats.Wins.Value += 1
touchPlayer.leaderstats.Coins.Value += 50
textLabel.Text = "Congrats on beating Level 1. You Have earned some rewards!"
textLabel.Visible = true
wait(4)
textLabel.Visible = false
wait(debtime)
deb = false
end
end)