im trying to make a level system and it cant get the LowerTorso of the player

local level = nil

game.Workspace.Map.Lobby.Grass.Touched:Connect(function(touchpart)
	local player = touchpart.Parent
	if touchpart.Name == "Handle" then -- if its a hat
		touchpart = touchpart.Parent
	end
	local humanoid = touchpart.Parent.Humanoid

	game.Workspace.Map.Level1.Floor.Touched:Connect(function()
		level = "1"
	end)
scriptinghelpers.org
	humanoid.Died:Connect(function()
		if level == "1" then
			wait(6.5)

			player.LowerTorso.CFrame = CFrame.new(game.Workspace.Map.Level1.Level1setter.Position) --right here
			print("level 1")
		elseif level == "2" then

		else
			print("nil")
		end
	end)
end)

this in a server script in server script service

1 comment

0

move "game.Workspace.Map.Level1.Floor.Touched:Connect(function()" under your last "end)"