so when you touch the lava instead of teleporting you to the correct position it teleports you to anything from 1,1,1 to 0,0,0
I cheaked with print spawnposition gives me the right value its something like 256,20ish, 0 and also does hidden value idk whats going wrong
local PlayerService = game:GetService("Players")
script.Parent.Touched:Connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
local HiddenValue = PlayerService:FindFirstChild(hit.Parent.Name).HiddenValues.CurrentLevel.Value
local SpawnPosition = game.Workspace.Spawns:FindFirstChild(HiddenValue).Position
hit.Parent.HumanoidRootPart.Position = Vector3.new(game.Workspace.Spawns:FindFirstChild(HiddenValue).Position)
end
end)

5 comments
thanks it worked and also im a idiot cuz i know what CFrame is but i started learning scripting like 2 week ago
No problem! Glad I could make it work
Please accept the answer rather then renaming the title
Oh I've just noticed that as well XD
k done that dident realise