I made an event that would Teleport a Player to Any level he wants
Heres the code
TeleportToLevel.OnServerEvent:Connect(function(Player, Level)
local Lvl = Player.leaderstats.Level
local Spawn = workspace:WaitForChild(tostring(Level))
Player.Character.HumanoidRootPart.CFrame = CFrame.new(Spawn.Position + Vector3.new(0,2,0))
Lvl.Value = Level
end)
For some reason I get this error saying
08:51:58.985 - Position is not a valid member of Model
and its for this line:
Player.Character.HumanoidRootPart.CFrame = CFrame.new(Spawn.Position + Vector3.new(0,2,0))

3 comments
maybe try doing Player.Character.HumanoidRootPart.Cframe = Spawn.CFrame? The error has something to do with the spawn though, I think.
Ok let me see
It does not work!