This is the code i tried to use.
local player = game.Players.LocalPlayer
local Players = game:GetService("Players")
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local Humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
if Players.LocalPlayer.Character.leaderstats.rebirths.Value <= 3 then
if plr then
plr.Character.HumanoidRootPart.CFrame = CFrame.new(1476.7, 0.5, -173.8)
end
end
end)

3 comments
So this script is located under the part that is the "door"?
it's located in the workspace and how to I make it so it finds to number of rebirths?
One thing tho! You cannot use game.Players.LocalPlayer in a normal script! You can only use this in a localscript.